|
CFEngine API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.recommender.algorithms.Experimental.DumbPopAlgorithm
Describes an implementation of the CFAlgorithm interface to make CF predictions using a poor non-personalized prediction algorithm. The ratings it predicts are simply the average ratings for each movie. This generally doesn't work as well as PopAlgorithm, which takes into account different user means.
Constructor Summary | |
DumbPopAlgorithm(DataManager mgr)
Constructor, simply assigns DataManager. |
Method Summary | |
long |
getAveragePredictionTime()
Return average prediction time. |
ItemPrediction[] |
getRecommendations(int activeUser,
int n)
Returns top n recommendations. |
ItemPrediction[] |
getRecommendationsByType(int activeUser,
int n,
int type)
Yun Wang Return top n recommendations of specific type. |
ItemPrediction |
predictRating(int activeUser,
int item)
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 this algorithm. |
void |
updateUser(int userID)
Requires no action. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DumbPopAlgorithm(DataManager mgr)
mgr
- Method Detail |
public ItemPrediction[] getRecommendationsByType(int activeUser, int n, int type) throws java.sql.SQLException, CFNotImplementedException
getRecommendationsByType
in interface CFAlgorithm
activeUser
- n
- type
-
java.sql.SQLException
CFNotImplementedException
public ItemPrediction[] getRecommendations(int activeUser, int n) throws java.sql.SQLException, CFNotImplementedException
getRecommendations
in interface CFAlgorithm
activeUser
- user to predict forn
- number of recommendations to acquire
java.sql.SQLException
CFNotImplementedException
public ItemPrediction predictRating(int activeUser, int item) throws CFNotImplementedException
CFAlgorithm
predictRating
in interface CFAlgorithm
activeUser
- item
-
CFNotImplementedException
public void updateUser(int userID) throws CFNotImplementedException
updateUser
in interface CFAlgorithm
userID
-
CFNotImplementedException
public long getAveragePredictionTime() throws CFNotImplementedException
getAveragePredictionTime
in interface CFAlgorithm
CFNotImplementedException
public java.lang.String toString()
toString
in interface CFAlgorithm
toString
in class java.lang.Object
|
CFEngine API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |