mlm_insights.core.features package
Submodules
mlm_insights.core.features.feature module
- class mlm_insights.core.features.feature.Feature(feature_metadata: FeatureMetadata)
Bases:
object
- add_metric(metric_metadata: MetricMetadata) Feature
Add a Insights Metric to a feature by providing the Metric Metadata. When added, Insights computes the metric for the feature and makes the metric result available via the Insights Profile
Parameters
- metric_metadataMetricMetadata
Metric Metadata describing the metric to be added. At a minimum, klass must be provided
- add_sfc(sfc_metadata: SFCMetaData) Feature
Add a Shareable Feature Component (SFC) to a Feature by providing the SFC Metadata. Insights computes the SFC once which can be shared with all the Feature-level metrics. Insights makes the SFC result available via the Insights Profile
Parameters
- sfc_metadataSFCMetaData
SFC Metadata describing the metric to be added. At a minimum, klass must be provided
- compute(column: Series) None
Compute the Feature metrics and Shareable Feature Component
Parameters
- column: pd.Series
Pandas Series which contains the feature data.
- classmethod deserialize(feature_message: FeatureMessage) Feature
Deserializes “Feature” from the protobuf FeatureMessage. Delegates constituent part deserialization to respective deserializers
- get_metric(metric_metadata: MetricMetadata) MetricBase
Get the Metric instance based on the Metric Metadata. Pass the same Metric Metadata as used in add_metric
Parameters
- metric_metadataMetricMetadata
Metric Metadata describing the metric to be added. At a minimum, klass must be provided
Returns
- MetricBase
Metric Instance
- get_name() str
- get_sfc(sfc_metadata: SFCMetaData) ShareableFeatureComponent
Get the ShareableFeatureComponent instance based on the SFC Metadata. Pass the same SFC Metadata as used in add_sfc
Parameters
- sfc_metadataSFCMetaData
SFC Metadata describing the SFC to be added. At a minimum, klass must be provided
Returns
- ShareableFeatureComponent
SFC Instance
- class mlm_insights.core.features.feature.FeatureMetadata(feature_name: str, feature_type: FeatureType)
Bases:
object
Class describes the properties for a Feature
- feature_name: str
- feature_type: FeatureType
- to_string() str