Nearest Neighbour Models
Implicit contains several item-item nearest neighbour models. See this post for more information.
CosineRecommender
-
class
implicit.nearest_neighbours.
CosineRecommender
(K=20, num_threads=0) Bases:
implicit.nearest_neighbours.ItemItemRecommender
An Item-Item Recommender on Cosine distances between items
TFIDFRecommender
-
class
implicit.nearest_neighbours.
TFIDFRecommender
(K=20, num_threads=0) Bases:
implicit.nearest_neighbours.ItemItemRecommender
An Item-Item Recommender on TF-IDF distances between items
BM25Recommender
-
class
implicit.nearest_neighbours.
BM25Recommender
(K=20, K1=1.2, B=0.75, num_threads=0) Bases:
implicit.nearest_neighbours.ItemItemRecommender
An Item-Item Recommender on BM25 distance between items
ItemItemRecommender
-
class
implicit.nearest_neighbours.
ItemItemRecommender
(K=20, num_threads=0) Bases:
implicit.recommender_base.RecommenderBase
Base class for Item-Item Nearest Neighbour recommender models here.
- Parameters
-
save
(fileobj_or_path) Saves the model to a file, using the numpy .npz format
- Parameters
file (str or io.IOBase) – Either the filename or an open file-like object to save the model to
See also