|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectprea.recommender.baseline.BaselineRecommender
prea.recommender.baseline.Random
public class Random
The class implementing a baseline, predicting uniformly randomly from the score range.
Field Summary |
---|
Fields inherited from class prea.recommender.baseline.BaselineRecommender |
---|
itemCount, maxValue, minValue, rateMatrix, userCount |
Constructor Summary | |
---|---|
Random(int uc,
int ic,
double max,
double min)
Construct a constant model with the given data. |
Method Summary | |
---|---|
double |
predict(int userId,
int itemId)
Predict a rating for the given user and item. |
Methods inherited from class prea.recommender.baseline.BaselineRecommender |
---|
buildModel, evaluate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Random(int uc, int ic, double max, double min)
uc
- The number of users in the dataset.ic
- The number of items in the dataset.max
- The maximum rating value in the dataset.min
- The minimum rating value in the dataset.Method Detail |
---|
public double predict(int userId, int itemId)
predict
in class BaselineRecommender
userId
- The target user.itemId
- The target item.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |