Property | Type | Description | |
---|---|---|---|
iteration_length | int |
Method | 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 |
Method | 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
|
public Predict ( int user_id, int item_id ) : double | ||
user_id | int | |
item_id | int | |
return | double |
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 |
return | void |
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 |
return | void |
protected UpdateFeatures ( int u, int i, int j ) : void | ||
u | int | |
i | int | |
j | int | |
return | void |