C# Class MyMediaLite.RatingPrediction.BiasedMatrixFactorization

Matrix factorization with explicit user and item bias, learning is performed by stochastic gradient descent

Per default optimizes for RMSE. Alternatively, you can set the Loss property to MAE or LogisticLoss. If set to log likelihood and with binary ratings, the recommender implements a simple version Menon and Elkan's LFL model, which predicts binary labels, has no advanced regularization, and uses no side information.

This recommender makes use of multi-core machines if requested. Just set MaxThreads to a large enough number (usually multiples of the number of available cores). The parallelization is based on ideas presented in the paper by Gemulla et al.

Literature: Ruslan Salakhutdinov, Andriy Mnih: Probabilistic Matrix Factorization. NIPS 2007. http://www.mit.edu/~rsalakhu/papers/nips07_pmf.pdf Steffen Rendle, Lars Schmidt-Thieme: Online-Updating Regularized Kernel Matrix Factorization Models for Large-Scale Recommender Systems. RecSys 2008. http://www.ismll.uni-hildesheim.de/pub/pdfs/Rendle2008-Online_Updating_Regularized_Kernel_Matrix_Factorization_Models.pdf Aditya Krishna Menon, Charles Elkan: A log-linear model with latent features for dyadic prediction. ICDM 2010. http://cseweb.ucsd.edu/~akmenon/LFL-ICDM10.pdf Rainer Gemulla, Peter J. Haas, Erik Nijkamp, Yannis Sismanis: Large-Scale Matrix Factorization with Distributed Stochastic Gradient Descent. KDD 2011. http://www.mpi-inf.mpg.de/~rgemulla/publications/gemulla11dsgd.pdf

This recommender supports incremental updates. See the paper by Rendle and Schmidt-Thieme.

Inheritance: MatrixFactorization
ファイルを表示 Open project: zenogantner/MML-KDD Class Usage Examples

Protected Properties

Property Type Description
item_bias double[]
user_bias double[]

Public Methods

Method Description
BiasedMatrixFactorization ( ) : System

Default constructor

ComputeLoss ( ) : double
Iterate ( ) : void
LoadModel ( string filename ) : void
Predict ( int user_id, int item_id ) : double
RemoveItem ( int item_id ) : void
RemoveUser ( int user_id ) : void
RetrainItem ( int item_id ) : void
RetrainUser ( int user_id ) : void
SaveModel ( string filename ) : void
ToString ( ) : string
Train ( ) : void

Protected Methods

Method Description
AddItem ( int item_id ) : void
AddUser ( int user_id ) : void
InitModel ( ) : void
Iterate ( IList rating_indices, bool update_user, bool update_item ) : void
IterateMAE ( IList rating_indices, bool update_user, bool update_item ) : void
IterateRMSE ( IList rating_indices, bool update_user, bool update_item ) : void

Method Details

AddItem() protected method

protected AddItem ( int item_id ) : void
item_id int
return void

AddUser() protected method

protected AddUser ( int user_id ) : void
user_id int
return void

BiasedMatrixFactorization() public method

Default constructor
public BiasedMatrixFactorization ( ) : System
return System

ComputeLoss() public method

public ComputeLoss ( ) : double
return double

InitModel() protected method

protected InitModel ( ) : void
return void

Iterate() public method

public Iterate ( ) : void
return void

Iterate() protected method

protected Iterate ( IList rating_indices, bool update_user, bool update_item ) : void
rating_indices IList
update_user bool
update_item bool
return void

IterateMAE() protected method

protected IterateMAE ( IList rating_indices, bool update_user, bool update_item ) : void
rating_indices IList
update_user bool
update_item bool
return void

IterateRMSE() protected method

protected IterateRMSE ( IList rating_indices, bool update_user, bool update_item ) : void
rating_indices IList
update_user bool
update_item bool
return void

LoadModel() public method

public LoadModel ( string filename ) : void
filename string
return void

Predict() public method

public Predict ( int user_id, int item_id ) : double
user_id int
item_id int
return double

RemoveItem() public method

public RemoveItem ( int item_id ) : void
item_id int
return void

RemoveUser() public method

public RemoveUser ( int user_id ) : void
user_id int
return void

RetrainItem() public method

public RetrainItem ( int item_id ) : void
item_id int
return void

RetrainUser() public method

public RetrainUser ( int user_id ) : void
user_id int
return void

SaveModel() public method

public SaveModel ( string filename ) : void
filename string
return void

ToString() public method

public ToString ( ) : string
return string

Train() public method

public Train ( ) : void
return void

Property Details

item_bias protected_oe property

the item biases
protected double[] item_bias
return double[]

user_bias protected_oe property

the user biases
protected double[] user_bias
return double[]