public class JaccardSimilarity extends AbstractRecommenderSimilarity
conf, similarityMatrix
Constructor and Description |
---|
JaccardSimilarity() |
Modifier and Type | Method and Description |
---|---|
double |
getCorrelation(SparseVector thisVector,
SparseVector thatVector)
Find the common rated items by this user and that user, or the common
users have rated this item or that item.
|
protected double |
getSimilarity(java.util.List<? extends java.lang.Number> thisList,
java.util.List<? extends java.lang.Number> thatList)
Calculate the similarity between thisList and thatList.
|
buildSimilarityMatrix, buildSocialSimilarityMatrix, getSimilarityMatrix
public double getCorrelation(SparseVector thisVector, SparseVector thatVector)
getCorrelation
in class AbstractRecommenderSimilarity
thisVector:
- the rated items by this user, or users that have rated this
item .thatVector:
- the rated items by that user, or users that have rated that
item.protected double getSimilarity(java.util.List<? extends java.lang.Number> thisList, java.util.List<? extends java.lang.Number> thatList)
AbstractRecommenderSimilarity
getSimilarity
in class AbstractRecommenderSimilarity
thisList
- this listthatList
- that listCopyright © 2017. All Rights Reserved.