relevanceai.operations_new.cluster.models.faiss.base
#
Faiss Base
Module Contents#
- class relevanceai.operations_new.cluster.models.faiss.base.FaissModel(model: Any, model_kwargs: Optional[Dict] = None)#
Faiss model base
- model :faiss.Kmeans#
- static check_vectors(input: Any) numpy.ndarray #
It takes a list of vectors, converts them to a numpy array, and then converts them to a float32
- Parameters
input (Any) – Any
- Return type
the input as a numpy array.
- fit_predict(self, vectors: Any) List[int] #
> The function takes in a list of vectors and returns a list of labels
- Parameters
vectors (Any) – Any - the vectors to be clustered
- Return type
The labels of the vectors.
- fit(self, vectors: Any) numpy.float64 #
It trains the model.
- Parameters
vectors (Any) – Any
- Return type
The model is being trained on the vectors.
- predict(self, vectors) List[int] #
This function takes in a list of vectors and returns a list of labels
- Parameters
vectors – The vectors to be predicted.
- Return type
The labels of the vectors.
- property cluster_centers_(self)#
It returns the centroids of the clusters
- Return type
The cluster centers
- property alias(self)#
The function takes a string and returns a string
- Return type
The alias of the model.