MatrixFactorizationRecommender {rsparse}R Documentation

Base class for matrix factorization recommenders

Description

All matrix factorization recommenders inherit from this class

Public fields

components

item embeddings

global_bias

global mean (for centering values in explicit feedback)

global_bias_base

Pre-calculated '-(factors*global_bias)' (for centering values in implicit feedback when not using user/item biases)

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.5.2 Index]