C# Class MyMediaLite.Correlation.AdjustedCosine

Class for (shrunk) adjusted cosine similarity
Badrul Sarwar, George Karypis, Joseph Konstan, John Riedl: Item-based collaborative filtering recommendation algorithms. WWW 2001
Inheritance: RatingCorrelationMatrix
Mostrar archivo Open project: zenogantner/MML-KDD Class Usage Examples

Public Properties

Property Type Description
shrinkage float

Public Methods

Method Description
AdjustedCosine ( int num_entities ) : System

Constructor. Create a AdjustedCosine matrix

ComputeCorrelation ( IRatings ratings, EntityType entity_type, int i, int j, float shrinkage ) : float

Compute correlations between two entities for given ratings

ComputeCorrelations ( IRatings ratings, EntityType entity_type ) : void

Compute correlations for given ratings

Create ( IRatings ratings, EntityType entity_type, float shrinkage ) : CorrelationMatrix

Create a AdjustedCosine matrix from given data

Method Details

AdjustedCosine() public method

Constructor. Create a AdjustedCosine matrix
public AdjustedCosine ( int num_entities ) : System
num_entities int the number of entities
return System

ComputeCorrelation() public static method

Compute correlations between two entities for given ratings
public static ComputeCorrelation ( IRatings ratings, EntityType entity_type, int i, int j, float shrinkage ) : float
ratings IRatings the rating data
entity_type EntityType the entity type, either USER or ITEM
i int the ID of first entity
j int the ID of second entity
shrinkage float the shrinkage parameter
return float

ComputeCorrelations() public method

Compute correlations for given ratings
public ComputeCorrelations ( IRatings ratings, EntityType entity_type ) : void
ratings IRatings the rating data
entity_type EntityType the entity type, either USER or ITEM
return void

Create() public static method

Create a AdjustedCosine matrix from given data
public static Create ( IRatings ratings, EntityType entity_type, float shrinkage ) : CorrelationMatrix
ratings IRatings the ratings data
entity_type EntityType the entity type, either USER or ITEM
shrinkage float a shrinkage parameter
return CorrelationMatrix

Property Details

shrinkage public_oe property

shrinkage parameter
public float shrinkage
return float