public class MockTestUser extends AbstractTestUser
| Modifier and Type | Class and Description |
|---|---|
static class |
MockTestUser.Builder |
| Constructor and Description |
|---|
MockTestUser(UserHistory<Event> train,
UserHistory<Event> test,
SparseVector preds,
List<ScoredId> recs,
Recommender rec) |
| Modifier and Type | Method and Description |
|---|---|
SparseVector |
getPredictions()
Get the user's predictions.
|
List<ScoredId> |
getRecommendations(int n,
ItemSelector candSel,
ItemSelector exclSel)
Get the user's recommendations.
|
Recommender |
getRecommender()
Get the recommender
|
UserHistory<Event> |
getTestHistory()
Return this user's test history.
|
UserHistory<Event> |
getTrainHistory()
Return this user's training history.
|
static MockTestUser.Builder |
newBuilder() |
getTestRatings, getUserIdpublic MockTestUser(UserHistory<Event> train, UserHistory<Event> test, SparseVector preds, List<ScoredId> recs, Recommender rec)
public UserHistory<Event> getTrainHistory()
TestUserpublic UserHistory<Event> getTestHistory()
TestUser@Nullable public SparseVector getPredictions()
TestUsernull if the algorithmInfo
does not support rating prediction.@Nullable public List<ScoredId> getRecommendations(int n, ItemSelector candSel, ItemSelector exclSel)
TestUsern - The number of recommendations to generate.candSel - The candidate selector.exclSel - The exclude selector.null if the recommender does not
support recommendation.ItemRecommender.recommend(long, int, java.util.Set,
java.util.Set)@Nullable public Recommender getRecommender()
TestUserpublic static MockTestUser.Builder newBuilder()