C# Class MyMediaLite.ItemRecommendation.BPR_Linear

Linear model optimized for BPR
This recommender does NOT support incremental updates.
Inheritance: ItemRecommender, IItemAttributeAwareRecommender, IIterativeModel
Afficher le fichier Open project: zenogantner/MML-KDD

Protected Properties

Свойство Type Description
iteration_length int

Méthodes publiques

Méthode Description
ComputeFit ( ) : double
Iterate ( ) : void

Perform one iteration of stochastic gradient ascent over the training data. One iteration is iteration_length * number of entries in the training matrix

LoadModel ( string filename ) : void
Predict ( int user_id, int item_id ) : double
SaveModel ( string filename ) : void
ToString ( ) : string
Train ( ) : void

Méthodes protégées

Méthode Description
SampleItemPair ( int u, int &i, int &j ) : void

Sample a pair of items, given a user

SampleTriple ( int &u, int &i, int &j ) : void

Sample a triple for BPR learning

SampleUser ( ) : int

Sample a user that has viewed at least one and not all items

UpdateFeatures ( int u, int i, int j ) : void

Modified feature update method that exploits attribute sparsity

Method Details

ComputeFit() public méthode

public ComputeFit ( ) : double
Résultat double

Iterate() public méthode

Perform one iteration of stochastic gradient ascent over the training data. One iteration is iteration_length * number of entries in the training matrix
public Iterate ( ) : void
Résultat void

LoadModel() public méthode

public LoadModel ( string filename ) : void
filename string
Résultat void

Predict() public méthode

public Predict ( int user_id, int item_id ) : double
user_id int
item_id int
Résultat double

SampleItemPair() protected méthode

Sample a pair of items, given a user
protected SampleItemPair ( int u, int &i, int &j ) : void
u int the user ID
i int the ID of the first item
j int the ID of the second item
Résultat void

SampleTriple() protected méthode

Sample a triple for BPR learning
protected SampleTriple ( int &u, int &i, int &j ) : void
u int the user ID
i int the ID of the first item
j int the ID of the second item
Résultat void

SampleUser() protected méthode

Sample a user that has viewed at least one and not all items
protected SampleUser ( ) : int
Résultat int

SaveModel() public méthode

public SaveModel ( string filename ) : void
filename string
Résultat void

ToString() public méthode

public ToString ( ) : string
Résultat string

Train() public méthode

public Train ( ) : void
Résultat void

UpdateFeatures() protected méthode

Modified feature update method that exploits attribute sparsity
protected UpdateFeatures ( int u, int i, int j ) : void
u int
i int
j int
Résultat void

Property Details

iteration_length protected_oe property

One iteration is iteration_length * number of entries in the training matrix
protected int iteration_length
Résultat int