public class OrdRecRatingPredictor extends AbstractRatingPredictor
Modifier and Type | Field and Description |
---|---|
static TypedSymbol<mikera.vectorz.IVector> |
RATING_PROBABILITY_CHANNEL |
Constructor and Description |
---|
OrdRecRatingPredictor(ItemScorer scorer,
UserEventDAO dao,
Quantizer q) |
OrdRecRatingPredictor(ItemScorer scorer,
UserEventDAO dao,
Quantizer quantizer,
double rate,
double reg,
int niters,
boolean reportDist)
Constructor of OrdRecRatingPrediciton
|
Modifier and Type | Method and Description |
---|---|
void |
predict(long uid,
MutableSparseVector predictions)
Predict for items in a vector.
|
predict, predict
public static final TypedSymbol<mikera.vectorz.IVector> RATING_PROBABILITY_CHANNEL
@Inject public OrdRecRatingPredictor(ItemScorer scorer, UserEventDAO dao, Quantizer quantizer, @LearningRate double rate, @RegularizationTerm double reg, @IterationCount int niters, @ReportRatingDistribution boolean reportDist)
scorer
- The ItemScorer to create scores of each itemdao
- The UserEventDAOquantizer
- The Quantizer used to quantizer the rating valuesrate
- The LearningRatereg
- The Regularizationpublic OrdRecRatingPredictor(ItemScorer scorer, UserEventDAO dao, Quantizer q)
public void predict(long uid, @Nonnull MutableSparseVector predictions)
RatingPredictor
uid
- The user ID.predictions
- The prediction output vector. Its key domain is the items to score.