ImplicitALSWrapperModel
- class rectools.models.implicit_als.ImplicitALSWrapperModel(model: Union[AlternatingLeastSquares, AlternatingLeastSquares], verbose: int = 0, fit_features_together: bool = False)[source]
Bases:
VectorModel
Wrapper for implicit.als.AlternatingLeastSquares with possibility to use explicit features and GPU support.
See https://implicit.readthedocs.io/en/latest/als.html for details of base model.
- Parameters
model (AnyAlternatingLeastSquares) – Base model that will be used.
verbose (int, default 0) – Degree of verbose output. If 0, no output will be provided.
fit_features_together (bool, default False) – Whether fit explicit features together with latent features or not. Used only if explicit features are present in dataset. See documentations linked above for details.
- Inherited-members
Methods
fit
(dataset, *args, **kwargs)Fit model.
Return user and item vector representations from fitted model.
recommend
(users, dataset, k, filter_viewed)Recommend items for users.
recommend_to_items
(target_items, dataset, k)Recommend items for target items.
Attributes
i2i_dist
n_threads
recommends_for_cold
recommends_for_warm
u2i_dist