| ScaleNormalize {rsparse} | R Documentation |
Re-scales input matrix proportinally to item popularity
Description
scales input user-item interaction matrix as per eq (16) from the paper. Usage of such rescaled matrix with [PureSVD] model will be equal to running PureSVD on the scaled cosine-based inter-item similarity matrix.
Public fields
normwhich norm model should make equal to one
scalehow to rescale norm vector
Methods
Public methods
Method new()
creates model
Usage
ScaleNormalize$new(scale = 0.5, norm = 2, target = c("rows", "columns"))Arguments
scalenumeric, how to rescale norm vector
normnumeric, which norm model should make equal to one
targetcharacter, defines whether rows or columns should be rescaled
Method fit()
fits the modes
Usage
ScaleNormalize$fit(x)
Arguments
xinput sparse matrix
Method transform()
transforms new matrix
Usage
ScaleNormalize$transform(x)
Arguments
xinput sparse matrix
Method fit_transform()
fits the model and transforms input
Usage
ScaleNormalize$fit_transform(x)
Arguments
xinput sparse matrix
Method clone()
The objects of this class are cloneable with this method.
Usage
ScaleNormalize$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
See EigenRec: Generalizing PureSVD for Effective and Efficient Top-N Recommendations for details.