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. For example, if the feature is categorical, then metadata would be all the categories. Defaults to None.
- static from_json(json_str)[source]¶
Provided a JSON string, this function reconstructs the
TabularFeature
class to which it corresponds.- Parameters:
json_str (str) – json string with all of the information necessary to construct the
TabularFeature
object- Returns:
Reconstructed
TabularFeature
object from the provided JSON- Return type: