@Shareable @Singleton public class ConstantPredictor extends AbstractBaselinePredictor
Modifier and Type | Class and Description |
---|---|
static interface |
ConstantPredictor.Value
Parameter: the value used by the constant scorer.
|
Constructor and Description |
---|
ConstantPredictor(double val)
Construct a new constant scorer.
|
Modifier and Type | Method and Description |
---|---|
void |
predict(long user,
MutableSparseVector output,
boolean predictSet)
Predict method that scores into an existing mutable sparse vector.
|
String |
toString() |
@Inject public ConstantPredictor(@ConstantPredictor.Value double val)
val
- The value to use.public void predict(long user, MutableSparseVector output, boolean predictSet)
BaselinePredictor
user
- The user ID.output
- The output vector. All items in the key domain are scoredpredictSet
- If true
, predict all items; otherwise, only predict
items that are not set..RatingPredictor.score(UserHistory, MutableSparseVector)
Copyright © 2013 GroupLens Research. All Rights Reserved.