Dimensionality Reduction

Dimensionality Reduction

class vectorai.api.dimensionality_reduction.ViDimensionalityReductionClient(username: str, api_key: str, url=None)

Dimensionality Reduction

dimensionality_reduce(collection_name: str, vectors: List[List[float]], vector_field: str, n_components: int, alias: str = 'default', return_curl: bool = False, **kwargs)

Trains a Dimensionality Reduction model on the collection

Dimensionality reduction allows your vectors to be reduced down to any dimensions greater than 0 using unsupervised machine learning. This is useful for even faster search and visualising the vectors.

Parameters
  • vector_field – Vector field to perform dimensionality reduction on

  • alias – Alias is used to name the dimensionality reduced vectors

  • n_components – The size/length to reduce the vector down to. If 0 is set then highest possible is of components is set, when this is done you can get reduction on demand of any length.

  • refresh – Whether to refresh the whole collection and retrain the dimensionality reduction model

  • collection_name – Name of Collection

dimensionality_reduction_job(collection_name: str, vector_field: str, n_components: int = 0, alias: str = 'default', refresh: bool = True, return_curl: bool = False, **kwargs)

Trains a Dimensionality Reduction model on the collection

Dimensionality reduction allows your vectors to be reduced down to any dimensions greater than 0 using unsupervised machine learning. This is useful for even faster search and visualising the vectors.

Parameters
  • vector_field – Vector field to perform dimensionality reduction on

  • alias – Alias is used to name the dimensionality reduced vectors

  • n_components – The size/length to reduce the vector down to. If 0 is set then highest possible is of components is set, when this is done you can get reduction on demand of any length.

  • refresh – Whether to refresh the whole collection and retrain the dimensionality reduction model

  • collection_name – Name of Collection