C# 클래스 MyMediaLite.RatingPrediction.UserKNN

Weighted user-based kNN
상속: KNN, IUserSimilarityProvider, IFoldInRatingPredictor
파일 보기 프로젝트 열기: zenogantner/MML-KDD

보호된 프로퍼티들

프로퍼티 타입 설명
data_user MyMediaLite.DataType.SparseBooleanMatrix

공개 메소드들

메소드 설명
AddRating ( int user_id, int item_id, double rating ) : void
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.

RemoveRating ( int user_id, int item_id ) : void
UpdateRating ( int user_id, int item_id, double rating ) : void
UserKNN ( ) : System

보호된 메소드들

메소드 설명
AddUser ( int user_id ) : void

메소드 상세

AddRating() 공개 메소드

public AddRating ( int user_id, int item_id, double rating ) : void
user_id int
item_id int
rating double
리턴 void

AddUser() 보호된 메소드

protected AddUser ( int user_id ) : void
user_id int
리턴 void

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

RemoveRating() 공개 메소드

public RemoveRating ( int user_id, int item_id ) : void
user_id int
item_id int
리턴 void

UpdateRating() 공개 메소드

public UpdateRating ( int user_id, int item_id, double rating ) : void
user_id int
item_id int
rating double
리턴 void

UserKNN() 공개 메소드

public UserKNN ( ) : System
리턴 System

프로퍼티 상세

data_user 보호되어 있는 프로퍼티

boolean matrix indicating which user rated which item
protected SparseBooleanMatrix,MyMediaLite.DataType data_user
리턴 MyMediaLite.DataType.SparseBooleanMatrix