public abstract class AbstractBaselinePredictor extends Object implements BaselinePredictor
Constructor and Description |
---|
AbstractBaselinePredictor() |
Modifier and Type | Method and Description |
---|---|
MutableSparseVector |
predict(long user,
Collection<Long> items)
Generate baseline predictions for several items into a new vector.
|
void |
predict(long user,
MutableSparseVector output)
Predict method that scores into an existing mutable sparse vector.
|
MutableSparseVector |
predict(long user,
SparseVector ratings,
Collection<Long> items)
Generate baseline predictions for several items into a new vector.
|
void |
predict(long user,
SparseVector ratings,
MutableSparseVector output)
Predict method that scores into an existing mutable sparse vector.
|
void |
predict(long user,
SparseVector ratings,
MutableSparseVector output,
boolean predictSet)
Predict method that scores into an existing mutable sparse vector.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
predict
public MutableSparseVector predict(long user, SparseVector ratings, Collection<Long> items)
Implements new-vector predict in terms of
predict(long, SparseVector, MutableSparseVector)
.
predict
in interface BaselinePredictor
user
- The user ID.ratings
- The user's ratings.items
- The items to score.items
.public void predict(long user, SparseVector ratings, MutableSparseVector output)
Delegates to predict(long, SparseVector, MutableSparseVector, boolean)
with predictSet
of true
.
predict
in interface BaselinePredictor
user
- The user ID.ratings
- The user's ratings.output
- The output vector. All items in the key domain are scored.RatingPredictor.score(UserHistory, MutableSparseVector)
public void predict(long user, SparseVector ratings, MutableSparseVector output, boolean predictSet)
Delegates to BaselinePredictor.predict(long, MutableSparseVector, boolean)
.
predict
in interface BaselinePredictor
user
- The user ID.ratings
- The user's ratings.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)
public MutableSparseVector predict(long user, Collection<Long> items)
Delegates to predict(long, MutableSparseVector)
.
predict
in interface BaselinePredictor
user
- The user ID.items
- The items to score.items
.public void predict(long user, MutableSparseVector output)
Delegates to BaselinePredictor.predict(long, MutableSparseVector, boolean)
with predictSet
of true
.
predict
in interface BaselinePredictor
user
- The user ID.output
- The output vector. All items in the key domain are scored.RatingPredictor.score(UserHistory, MutableSparseVector)
Copyright © 2013 GroupLens Research. All Rights Reserved.