MatrixFactorizationRecommender {rsparse}R Documentation

Base class for matrix factorization recommenders

Description

All matrix factorization recommenders inherit from this class

Public fields

components

item embeddings

Methods

Public methods


Method predict()

recommends items for users

Usage
MatrixFactorizationRecommender$predict(
  x,
  k,
  not_recommend = x,
  items_exclude = integer(0),
  ...
)
Arguments
x

user-item interactions matrix (usually sparse - 'Matrix::sparseMatrix').Users are rows and items are columns

k

number of items to recommend

not_recommend

user-item matrix (sparse) which describes which items method should NOT recomment for each user. Usually this is same as ‘x' as we don’t want to recommend items user already liked.

items_exclude

either integer indices or character identifiers of the items to not recommend to any user.

...

not used at the moment


Method clone()

The objects of this class are cloneable with this method.

Usage
MatrixFactorizationRecommender$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


[Package rsparse version 0.4.0 Index]