|
CFEngine API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for a collaborative filtering algorithm.
Method Summary | |
long |
getAveragePredictionTime()
Very useful to get the prediction time after a bunch of experiment Should be implemented within each algorithm class. |
ItemPrediction[] |
getRecommendations(int activeUser,
int n)
Return top n recommendations for the active user. |
ItemPrediction[] |
getRecommendationsByType(int activeUser,
int n,
int type)
Added by Yun Wang Return top n recommendations for the active user of specific type. |
ItemPrediction |
predictRating(int userID,
int itemID)
Asks the prediction engine to return a prediction for how a particular user will rate a particular item. |
java.lang.String |
toString()
Return the name of algorithm. |
void |
updateUser(int userID)
Notify algorithm that the given user's ratings have changed. |
Method Detail |
public ItemPrediction predictRating(int userID, int itemID) throws CFNotImplementedException
userID
- itemID
-
CFNotImplementedException
public ItemPrediction[] getRecommendations(int activeUser, int n) throws java.sql.SQLException, CFNotImplementedException
activeUser
- n
-
java.sql.SQLException
CFNotImplementedException
public java.lang.String toString()
toString
in class java.lang.Object
public long getAveragePredictionTime() throws CFNotImplementedException
CFNotImplementedException
public void updateUser(int userID) throws CFNotImplementedException
userID
-
CFNotImplementedException
public ItemPrediction[] getRecommendationsByType(int activeUser, int n, int type) throws java.sql.SQLException, CFNotImplementedException
activeUser
- n
- type
-
java.sql.SQLException
CFNotImplementedException
|
CFEngine API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |