public class CorrelationConstrained extends UserSimilarityMetric
datamodel, similarities
Constructor and Description |
---|
CorrelationConstrained(double median)
Constructor of the similarity metric
|
Modifier and Type | Method and Description |
---|---|
double |
similarity(User user,
User otherUser)
This method must returns the similarity between two users.
|
String |
toString() |
afterRun, beforeRun, getSimilarities, run, setDatamodel
public CorrelationConstrained(double median)
median
- Median of the ratings of the DataModel instancepublic double similarity(User user, User otherUser)
UserSimilarityMetric
If two users 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 users.
similarity
in class UserSimilarityMetric
user
- A userotherUser
- Other userpublic String toString()
toString
in class UserSimilarityMetric
Copyright © 2020. All rights reserved.