ScaleNormalize | R Documentation |
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.
norm
which norm model should make equal to one
scale
how to rescale norm vector
new()
creates model
ScaleNormalize$new(scale = 0.5, norm = 2, target = c("rows", "columns"))
scale
numeric, how to rescale norm vector
norm
numeric, which norm model should make equal to one
target
character, defines whether rows or columns should be rescaled
fit()
fits the modes
ScaleNormalize$fit(x)
x
input sparse matrix
transform()
transforms new matrix
ScaleNormalize$transform(x)
x
input sparse matrix
fit_transform()
fits the model and transforms input
ScaleNormalize$fit_transform(x)
x
input sparse matrix
clone()
The objects of this class are cloneable with this method.
ScaleNormalize$clone(deep = FALSE)
deep
Whether to make a deep clone.
See EigenRec: Generalizing PureSVD for Effective and Efficient Top-N Recommendations for details.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.