C# 클래스 MyMediaLite.RatingPrediction.UserItemBaseline

Baseline method for rating prediction

Uses the average rating value, plus a regularized user and item bias for prediction.

The method was described in section 2.1 of the paper below. One difference is that we support several iterations of alternating optimization, instead of just one.

The optimization problem solved by the Train() method is the following: \f[ \min_{\mathbf{a}, \mathbf{b}} \sum_{(u, i, r) \in R} (r - \mu_R - a_u - b_i)^2 + \lambda_1 \|\mathbf{a}\|^2 + \lambda_2 \|\mathbf{b}\|^2, \f] where \f$R\f$ are the known ratings, and \f$\lambda_1\f$ and \f$\lambda_2\f$ are the regularization constants RegU and RegI. The sum represents the least squares error, while the two terms starting with \f$\lambda_1\f$ and \f$\lambda_2\f$, respectively, are regularization terms that control the parameter sizes to avoid overfitting. The optimization problem is solved an alternating least squares method.

Literature: Yehuda Koren: Factor in the Neighbors: Scalable and Accurate Collaborative Filtering, Transactions on Knowledge Discovery from Data (TKDD), 2009. http://public.research.att.com/~volinsky/netflix/factorizedNeighborhood.pdf

This recommender supports incremental updates.

상속: MyMediaLite.RatingPrediction.IncrementalRatingPredictor, IIterativeModel
파일 보기 프로젝트 열기: zenogantner/MML-KDD 1 사용 예제들

공개 메소드들

메소드 설명
AddRating ( int user_id, int item_id, double rating ) : void
ComputeFit ( ) : double
Iterate ( ) : void
LoadModel ( string filename ) : void
Predict ( int user_id, int item_id ) : double
RemoveRating ( int user_id, int item_id ) : void
SaveModel ( string filename ) : void
ToString ( ) : string
Train ( ) : void
UpdateRating ( int user_id, int item_id, double rating ) : void
UserItemBaseline ( ) : System

Default constructor

보호된 메소드들

메소드 설명
AddItem ( int item_id ) : void
AddUser ( int user_id ) : void
RetrainItem ( int item_id ) : void
RetrainUser ( int user_id ) : void

비공개 메소드들

메소드 설명
OptimizeItemBiases ( ) : void
OptimizeUserBiases ( ) : void

메소드 상세

AddItem() 보호된 메소드

protected AddItem ( int item_id ) : void
item_id int
리턴 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

ComputeFit() 공개 메소드

public ComputeFit ( ) : double
리턴 double

Iterate() 공개 메소드

public Iterate ( ) : void
리턴 void

LoadModel() 공개 메소드

public LoadModel ( string filename ) : void
filename string
리턴 void

Predict() 공개 메소드

public Predict ( int user_id, int item_id ) : double
user_id int
item_id int
리턴 double

RemoveRating() 공개 메소드

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

RetrainItem() 보호된 메소드

protected RetrainItem ( int item_id ) : void
item_id int
리턴 void

RetrainUser() 보호된 메소드

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

SaveModel() 공개 메소드

public SaveModel ( string filename ) : void
filename string
리턴 void

ToString() 공개 메소드

public ToString ( ) : string
리턴 string

Train() 공개 메소드

public Train ( ) : void
리턴 void

UpdateRating() 공개 메소드

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

UserItemBaseline() 공개 메소드

Default constructor
public UserItemBaseline ( ) : System
리턴 System