ScaleNormalize: Re-scales input matrix proportinally to item popularity

ScaleNormalizeR 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

norm

which norm model should make equal to one

scale

how to rescale norm vector

Methods

Public methods


Method new()

creates model

Usage
ScaleNormalize$new(scale = 0.5, norm = 2, target = c("rows", "columns"))
Arguments
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


Method fit()

fits the modes

Usage
ScaleNormalize$fit(x)
Arguments
x

input sparse matrix


Method transform()

transforms new matrix

Usage
ScaleNormalize$transform(x)
Arguments
x

input sparse matrix


Method fit_transform()

fits the model and transforms input

Usage
ScaleNormalize$fit_transform(x)
Arguments
x

input sparse matrix


Method clone()

The objects of this class are cloneable with this method.

Usage
ScaleNormalize$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

References

See EigenRec: Generalizing PureSVD for Effective and Efficient Top-N Recommendations for details.


rsparse documentation built on Sept. 12, 2022, 1:06 a.m.