gnes.indexer.vector.annoy module

class gnes.indexer.vector.annoy.AnnoyIndexer(num_dim: int, data_path: str, metric: str = 'angular', n_trees=10, *args, **kwargs)[source]

Bases: gnes.indexer.base.BaseVectorIndexer

add(keys: List[Tuple[int, Any]], vectors: numpy.ndarray, weights: List[float], *args, **kwargs)[source]
normalize_score(score: List[float], metrics: str, *args, **kwargs) → List[float][source]
post_init()[source]

Declare class attributes/members that can not be serialized in standard way

query()[source]
size
train(*args, **kwargs)

Train the model, need to be overrided