C# Класс 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
Наследование: RatingCorrelationMatrix
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
shrinkage float

Открытые методы

Метод Описание
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

Описание методов

AdjustedCosine() публичный Метод

Constructor. Create a AdjustedCosine matrix
public AdjustedCosine ( int num_entities ) : System
num_entities int the number of entities
Результат System

ComputeCorrelation() публичный статический Метод

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
Результат float

ComputeCorrelations() публичный Метод

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
Результат void

Create() публичный статический Метод

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
Результат CorrelationMatrix

Описание свойств

shrinkage публичное свойство

shrinkage parameter
public float shrinkage
Результат float