CustomFeature
API reference for CustomFeature
CustomFeature
Base class for all custom feature types in Fiddler models.
CustomFeature provides the foundation for creating specialized feature types that enhance model monitoring and analysis. Custom features allow you to define derived metrics, embeddings, and enrichments that extend beyond basic model inputs and outputs for advanced drift detection and analysis.
This is an abstract base class that should not be instantiated directly. Instead, use one of its concrete subclasses: Multivariate, VectorFeature, TextEmbedding, ImageEmbedding, or Enrichment.
Examples
Creating a multivariate feature from multiple columns:
feature = CustomFeature.from_columns(
custom_name=”user_behavior_cluster”,
cols=[“clicks”, “views”, “time_spent”],
n_clusters=5
)Creating a custom feature from a dictionary:
feature_dict = {
“name”: “text_sentiment”,
“type”: “FROM_TEXT_EMBEDDING”,
“column”: “embedding_col”,
“source_column”: “review_text”
}
feature = CustomFeature.from_dict(feature_dict)class Config
allow_mutation = False
use_enum_values = True
discriminator = 'type'
classmethod from_columns(custom_name, cols, n_clusters=5)
Return type: Multivariate
classmethod from_dict(deserialized_json)
Parameters
deserialized_json (dict) Return type: Any
to_dict()
Return type: Dict[str, Any]
Last updated
Was this helpful?