Skip to main content
VectorFeature processes high-dimensional vector data (like embeddings or feature vectors) by applying k-means clustering to create discrete clusters that can be monitored for distribution changes over time. This is particularly useful for monitoring embedding drift in high-dimensional spaces. The feature type is automatically set to CustomFeatureType.FROM_VECTOR and creates meaningful groupings from vector data for drift detection and anomaly identification.

source_column

Optional original column if this feature is derived from an embedding

Examples

Creating a feature from a general embedding column:
Creating a feature from model hidden states:

Attributes

Type discriminator; fixed as CustomFeatureType.FROM_VECTOR.
Number of k-means clusters used for drift detection (default 5).
Cluster centroids in the embedded space; populated during training.
Name of the vector (embedding) column this feature is derived from.

classmethod validate_n_clusters()

Returns

int