|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjcolibri.extensions.recommendation.collaborative.MatrixCaseBase
jcolibri.extensions.recommendation.collaborative.PearsonMatrixCaseBase
public class PearsonMatrixCaseBase
Extension of the MatrixCaseBase that computes similarities among neighbors
using the Pearson Correlation.
It uses a minCorrelateItems Factor to weight similar neighbors that have
few common correlate items.
MoviesRecommender
Nested Class Summary |
---|
Nested classes/interfaces inherited from class jcolibri.extensions.recommendation.collaborative.MatrixCaseBase |
---|
MatrixCaseBase.RatingTuple, MatrixCaseBase.SimilarTuple |
Constructor Summary | |
---|---|
PearsonMatrixCaseBase(Attribute value,
int minCorrelateItemsFactor)
Constructor |
Method Summary | |
---|---|
protected void |
computeSimilarities()
Computes the similarity of neighbors (each neighbor is defined by the description) |
double |
getAverage(int id)
returns the ratings average for a given user |
double |
getSimil(java.lang.Integer id1,
java.lang.Integer id2)
Returns the similarity of two neighbors. |
java.util.Collection<MatrixCaseBase.SimilarTuple> |
getSimilar(java.lang.Integer id)
Returns the list of similar neighbors for a given one |
Methods inherited from class jcolibri.extensions.recommendation.collaborative.MatrixCaseBase |
---|
close, forgetCases, getCases, getCases, getDescription, getDescriptions, getRatingTuples, getSolution, getSolutions, init, learnCases |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PearsonMatrixCaseBase(Attribute value, int minCorrelateItemsFactor)
value
- is the attribute of the result part of the case that contains the ratingminCorrelateItemsFactor
- factor that decreases the similarity between users
who have fewer than this number of co-rated itemsMethod Detail |
---|
protected void computeSimilarities()
MatrixCaseBase
computeSimilarities
in class MatrixCaseBase
public java.util.Collection<MatrixCaseBase.SimilarTuple> getSimilar(java.lang.Integer id)
MatrixCaseBase
getSimilar
in class MatrixCaseBase
id
- of the neighbor
public double getSimil(java.lang.Integer id1, java.lang.Integer id2)
MatrixCaseBase
getSimil
in class MatrixCaseBase
id1
- of the first neighborid2
- of the second neighbor.
public double getAverage(int id)
id
- is the user
|
GAIA - Group for Artificial Intelligence Applications http://gaia.fdi.ucm.es |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |