- class recpack.algorithms.TopKItemSimilarityMatrixAlgorithm(K)
Base algorithm for algorithms that fit an item to item similarity model with K similar items for every item
Model that encodes the similarity between items is expected under the
This matrix should have shape
(|items| x |items|). This can be dense or sparse matrix depending on the algorithm used.
Predictions are made by computing the dot product of the history vector of a user and the similarity matrix.
Usually a new algorithm will have to implement just the
_fit()method, to construct the self.similarity_matrix_ attribute.
K (int) – How many similar items will be kept per item.
Name of the object.
Name of the object's class.