C# 클래스 MyMediaLite.Correlation.Pearson

Shrunk Pearson correlation for rating data

The correlation values are shrunk towards zero, depending on the number of ratings the estimate is based on. Otherwise, we would give too much weight to similarities estimated from just a few examples.

http://en.wikipedia.org/wiki/Pearson_correlation

We apply shrinkage as in formula (5.16) of chapter 5 of the Recommender Systems Handbook. Note that the shrinkage formula has changed betweem the two publications. It is now based on the assumption that the true correlations are normally distributed; the shrunk estimate is the posterior mean of the empirical estimate.

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 Yehuda Koren, Robert Bell: Advances in Collaborative Filtering, Chapter 5 of the Recommender Systems Handbook, Springer, 2011. http://research.yahoo.net/files/korenBellChapterSpringer.pdf

상속: RatingCorrelationMatrix
파일 보기 프로젝트 열기: zenogantner/MyMediaLite 1 사용 예제들

공개 메소드들

메소드 설명
ComputeCorrelation ( IRatings ratings, EntityType entity_type, float>.IList entity_ratings, int j ) : float
ComputeCorrelation ( IRatings ratings, EntityType entity_type, int i, int j ) : float
ComputeCorrelations ( IRatings ratings, EntityType entity_type ) : void
Pearson ( int num_entities, float shrinkage ) : System

Constructor. Create a Pearson correlation matrix

보호된 메소드들

메소드 설명
ComputeCorrelation ( double i_sum, double j_sum, double ii_sum, double jj_sum, double ij_sum, int n ) : float
GetDenominator ( double i_sum, double j_sum, double ii_sum, double jj_sum, int n ) : double
GetNumerator ( double i_sum, double j_sum, double ij_sum, int n ) : double

메소드 상세

ComputeCorrelation() 공개 메소드

public ComputeCorrelation ( IRatings ratings, EntityType entity_type, float>.IList entity_ratings, int j ) : float
ratings IRatings
entity_type EntityType
entity_ratings float>.IList
j int
리턴 float

ComputeCorrelation() 공개 메소드

public ComputeCorrelation ( IRatings ratings, EntityType entity_type, int i, int j ) : float
ratings IRatings
entity_type EntityType
i int
j int
리턴 float

ComputeCorrelation() 보호된 메소드

protected ComputeCorrelation ( double i_sum, double j_sum, double ii_sum, double jj_sum, double ij_sum, int n ) : float
i_sum double
j_sum double
ii_sum double
jj_sum double
ij_sum double
n int
리턴 float

ComputeCorrelations() 공개 메소드

public ComputeCorrelations ( IRatings ratings, EntityType entity_type ) : void
ratings IRatings
entity_type EntityType
리턴 void

GetDenominator() 보호된 메소드

protected GetDenominator ( double i_sum, double j_sum, double ii_sum, double jj_sum, int n ) : double
i_sum double
j_sum double
ii_sum double
jj_sum double
n int
리턴 double

GetNumerator() 보호된 메소드

protected GetNumerator ( double i_sum, double j_sum, double ij_sum, int n ) : double
i_sum double
j_sum double
ij_sum double
n int
리턴 double

Pearson() 공개 메소드

Constructor. Create a Pearson correlation matrix
public Pearson ( int num_entities, float shrinkage ) : System
num_entities int the number of entities
shrinkage float shrinkage parameter
리턴 System