C# Класс 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
Наследование: UserItemBaseline
Показать файл Открыть проект

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
CreateSimilarityMatrix ( string typename ) : void

Описание методов

LoadModel() публичный Метод

public LoadModel ( string filename ) : void
filename string
Результат void

NewKNN() публичный Метод

Constructor
public NewKNN ( ) : System
Результат System

Predict() публичный Метод

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
Результат double

SaveModel() публичный Метод

public SaveModel ( string filename ) : void
filename string
Результат void

ToString() публичный Метод

public ToString ( ) : string
Результат string

Train() публичный Метод

public Train ( ) : void
Результат void