C# Class MyMediaLite.RatingPrediction.NewKNN

kNN-based rating predictors (not working yet)
The method is described in section 2.2 of Yehuda Koren Factor in the Neighbors: Scalable and Accurate Collaborative Filtering Transactions on Knowledge Discovery from Data (TKDD), 2009 This recommender does NOT support incremental updates. ItemRecommendation.KNN
Inheritance: UserItemBaseline
Datei anzeigen Open project: zenogantner/MML-KDD

Public Methods

Method Description
LoadModel ( string filename ) : void
NewKNN ( ) : System

Constructor

Predict ( int user_id, int item_id ) : double

Predict the rating of a given user for a given item

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

SaveModel ( string filename ) : void
ToString ( ) : string
Train ( ) : void

Private Methods

Method Description
CreateSimilarityMatrix ( string typename ) : void

Method Details

LoadModel() public method

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

NewKNN() public method

Constructor
public NewKNN ( ) : System
return System

Predict() public method

Predict the rating of a given user for a given item
If the user or the item are not known to the recommender, a suitable average rating 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 filename ) : void
filename string
return void

ToString() public method

public ToString ( ) : string
return string

Train() public method

public Train ( ) : void
return void