C# Class 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

Inheritance: RatingCorrelationMatrix
Afficher le fichier Open project: zenogantner/MyMediaLite Class Usage Examples

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
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

Method Details

ComputeCorrelation() public méthode

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
Résultat float

ComputeCorrelation() public méthode

public ComputeCorrelation ( IRatings ratings, EntityType entity_type, int i, int j ) : float
ratings IRatings
entity_type EntityType
i int
j int
Résultat float

ComputeCorrelation() protected méthode

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
Résultat float

ComputeCorrelations() public méthode

public ComputeCorrelations ( IRatings ratings, EntityType entity_type ) : void
ratings IRatings
entity_type EntityType
Résultat void

GetDenominator() protected méthode

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
Résultat double

GetNumerator() protected méthode

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
Résultat double

Pearson() public méthode

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
Résultat System