|
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.BayesNetAlgorithm
Describes an implementation of the CFAlgorithm interface to make CF predictions using the popularity algorithm: just average ratings from all users.
Field Summary | |
(package private) BayesNet |
model
|
Constructor Summary | |
BayesNetAlgorithm(DataManager mgr)
Get algorithm properties and initialize a BayesNet object. |
Method Summary | |
long |
getAveragePredictionTime()
Return average prediction time |
ItemRating[] |
getRecommendations(int activeUser,
int n)
Returns top n recommendations Not yet complete |
ItemRating[] |
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 activeUser,
int item)
predicts the rating for the given user and item. |
java.lang.String |
toString()
Return the name of this algorithm |
void |
updateUser(int userID)
Update user information, not yet complete. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
BayesNet model
Constructor Detail |
public BayesNetAlgorithm(DataManager mgr) throws CFNotImplementedException
mgr
- the DataManager of dataMethod Detail |
public ItemRating[] getRecommendations(int activeUser, int n) throws java.sql.SQLException, CFNotImplementedException
getRecommendations
in interface CFAlgorithm
activeUser
- n
-
java.sql.SQLException
CFNotImplementedException
public ItemRating[] getRecommendationsByType(int activeUser, int n, int type) throws java.sql.SQLException, CFNotImplementedException
CFAlgorithm
getRecommendationsByType
in interface CFAlgorithm
activeUser
- n
- type
-
java.sql.SQLException
CFNotImplementedException
public ItemPrediction predictRating(int activeUser, int item) throws CFNotImplementedException
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 |