Embedding

Arize class to map up to 3 columns (vector, data, and link_to_data) to a single embedding feature.

class Embedding(
    vector: List[float]
    data: Optional[Union[str, List[str]]]
    link_to_data: Optional[str]
)

Code Example

from arize.utils.types import ModelTypes, Environments, Embedding

# Example NLP embedding features
embedding_features = {
        "nlp_embedding": Embedding(
            vector=pd.Series([4.0, 5.0, 6.0, 7.0]),
            data="This is a test sentence",
        ),
}

# Example CV embedding features
embedding_features = {
        "image_embedding": Embedding(
            vector=np.array([1.0, 2, 3]),
            link_to_data="https://link-to-my-image.png",
        ),
}

Last updated

Copyright © 2023 Arize AI, Inc