C# Class MyMediaLite.ItemRecommendation.MF

Abstract class for matrix factorization based item predictors
Inheritance: MyMediaLite.ItemRecommendation.IncrementalItemRecommender, IIterativeModel
Exibir arquivo Open project: zenogantner/MML-KDD

Protected Properties

Property Type Description
item_factors Matrix
num_factors int
user_factors Matrix

Public Methods

Method Description
ComputeFit ( ) : double

Computes the fit (optimization criterion) on the training data

Iterate ( ) : void

Iterate once over the data

LoadModel ( string file ) : void
MF ( ) : System

Default constructor

Predict ( int user_id, int item_id ) : double

Predict the weight for a given user-item combination

If the user or the item are not known to the recommender, zero is returned. To avoid this behavior for unknown entities, use CanPredict() to check before.

SaveModel ( string file ) : void
Train ( ) : void

Protected Methods

Method Description
InitModel ( ) : void

Method Details

ComputeFit() public abstract method

Computes the fit (optimization criterion) on the training data
public abstract ComputeFit ( ) : double
return double

InitModel() protected method

protected InitModel ( ) : void
return void

Iterate() public abstract method

Iterate once over the data
public abstract Iterate ( ) : void
return void

LoadModel() public method

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

MF() public method

Default constructor
public MF ( ) : System
return System

Predict() public method

Predict the weight for a given user-item combination
If the user or the item are not known to the recommender, zero is returned. To avoid this behavior for unknown entities, use CanPredict() to check before.
public Predict ( int user_id, int item_id ) : double
user_id int the user ID
item_id int the item ID
return double

SaveModel() public method

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

Train() public method

public Train ( ) : void
return void

Property Details

item_factors protected_oe property

Latent item factor matrix
protected Matrix item_factors
return Matrix

num_factors protected_oe property

Number of latent factors per user/item
protected int num_factors
return int

user_factors protected_oe property

Latent user factor matrix
protected Matrix user_factors
return Matrix