fl4health.feature_alignment.tabular_feature module

class TabularFeature(feature_name, feature_type, fill_value, metadata=None)[source]

Bases: object

__init__(feature_name, feature_type, fill_value, metadata=None)[source]

Information that represents a tabular feature.

Parameters:
  • feature_name (str) – name of the feature.

  • feature_type (TabularType) – data type of the feature.

  • fill_value (Scalar | None) – the default fill value for this feature when it is missing in a dataframe.

  • metadata (MetaData, optional) – metadata associated with this feature.

  • example (For)

  • categorical (if the feature is)

  • None. (then metadata would be all the categories. Defaults to)

static from_json(json_str)[source]
Return type:

TabularFeature

get_feature_name()[source]
Return type:

str

get_feature_type()[source]
Return type:

TabularType

get_fill_value()[source]
Return type:

Union[bool, bytes, float, int, str]

get_metadata()[source]
Return type:

dict[str, int] | list[Union[bool, bytes, float, int, str]]

get_metadata_dimension()[source]
Return type:

int

to_json()[source]
Return type:

str