public class Cosine extends UserSimilarityMetric
datamodel, similarities
Constructor and Description |
---|
Cosine() |
Modifier and Type | Method and Description |
---|---|
double |
similarity(User user,
User otherUser)
This method must returns the similarity between two users.
|
afterRun, beforeRun, getSimilarities, run, setDatamodel, toString
public 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 userCopyright © 2020. All rights reserved.