Class PIP
- java.lang.Object
-
- es.upm.etsisi.cf4j.recommender.knn.userSimilarityMetric.UserSimilarityMetric
-
- es.upm.etsisi.cf4j.recommender.knn.userSimilarityMetric.PIP
-
public class PIP extends UserSimilarityMetric
Implements the following CF similarity metric: Ahn, H. J. (2008). A new similarity measure for collaborative filtering to alleviate the new user cold-starting problem, Information Sciences, 178, 37-51.
-
-
Field Summary
-
Fields inherited from class es.upm.etsisi.cf4j.recommender.knn.userSimilarityMetric.UserSimilarityMetric
datamodel, similarities
-
-
Constructor Summary
Constructors Constructor Description PIP()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeforeRun()Is executed once before execute the method 'exec'.doublesimilarity(User user, User otherUser)This method must returns the similarity between two users.-
Methods inherited from class es.upm.etsisi.cf4j.recommender.knn.userSimilarityMetric.UserSimilarityMetric
afterRun, getSimilarities, run, setDatamodel, toString
-
-
-
-
Method Detail
-
beforeRun
public void beforeRun()
Description copied from interface:PartibleIs executed once before execute the method 'exec'. It can be used to initialize resources.- Specified by:
beforeRunin interfacePartible<User>- Overrides:
beforeRunin classUserSimilarityMetric
-
similarity
public double similarity(User user, User otherUser)
Description copied from class:UserSimilarityMetricThis method must returns the similarity between two users.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.
- Specified by:
similarityin classUserSimilarityMetric- Parameters:
user- A userotherUser- Other user- Returns:
- Similarity between user and otherUser
-
-