public class CorrelationConstrained extends ItemSimilarityMetric
datamodel, similarities
Constructor and Description |
---|
CorrelationConstrained(double median)
Constructor of the similarity metric
|
Modifier and Type | Method and Description |
---|---|
double |
similarity(Item item,
Item otherItem)
This method must returns the similarity between two items.
|
String |
toString() |
afterRun, beforeRun, getSimilarities, run, setDatamodel
public CorrelationConstrained(double median)
median
- Median of the ratings of the DataSet instancepublic double similarity(Item item, Item otherItem)
ItemSimilarityMetric
If two items do not have a similarity value, the method must return Double.NEGATIVE_INFINITY.
The value returned by this method should be higher the greater the similarity between items.
similarity
in class ItemSimilarityMetric
item
- An itemotherItem
- Other itempublic String toString()
toString
in class ItemSimilarityMetric
Copyright © 2020. All rights reserved.