# VectorFeature

Represents custom features derived from a single vector column using clustering analysis.

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:

```python
vector_feature = VectorFeature(
    name="embedding_clusters",
    column="user_embedding",
    n_clusters=10
)
```

Creating a feature from model hidden states:

```python
hidden_feature = VectorFeature(
    name="hidden_state_clusters",
    column="model_hidden_layer",
    n_clusters=15,
    source_column="input_features"
)
```

## type *: Literal\['FROM\_VECTOR']*

## n\_clusters *: int | None*

## centroids *: List | None*

## column *: str*

## *classmethod* validate\_n\_clusters(value)

**Return type:** int


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fiddler.ai/api/fiddler-python-client-sdk/schemas/vector-feature.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
