fdl.CustomFeature

This is the base class that all other custom features inherit from. It's flexible enough to accommodate different types of derived features. Note: All of the derived feature classes (e.g., Multivariate, VectorFeature, etc.) inherit from CustomFeature and thus have its properties, in addition to their specific ones.

Input ParameterTypeDefaultDescription
namestrNoneThe name of the custom feature.
typeCustomFeatureTypeNoneThe type of custom feature. Must be one of the CustomFeatureType enum values.
n_clustersOptional[int]5The number of clusters.
centroidsOptional[List]NoneCentroids of the clusters in the embedded space. Number of centroids equal to n_clusters.
columnsOptional[List[str]]NoneFor FROM_COLUMNS type, represents the original columns from which the feature is derived.
columnOptional[str]NoneUsed for vector-derived features, the original vector column name.
source_columnOptional[str]NoneSpecifies the original column name for embedding-derived features.
n_tagsOptional[int]5For FROM_TEXT_EMBEDDING type, represents the number of tags for each cluster in the tfidf summarization in drift computation.
# use from_columns helper function to generate a custom feature combining multiple numeric columns

feature = fdl.CustomFeature.from_columns(
    name='my_feature',
    columns=['column_1', 'column_2'],
    n_clusters=5
)