public class LenskitTestUser extends AbstractTestUser
| Constructor and Description |
|---|
LenskitTestUser(LenskitRecommender rec,
UserHistory<Event> testData)
Construct a new test user.
|
| 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.
|
LenskitRecommender |
getRecommender()
Get the recommender
|
UserHistory<Event> |
getTestHistory()
Return this user's test history.
|
UserHistory<Event> |
getTrainHistory()
Return this user's training history.
|
getTestRatings, getUserIdpublic LenskitTestUser(LenskitRecommender rec, UserHistory<Event> testData)
rec - The LensKit recommender.testData - The user history to test.public UserHistory<Event> getTrainHistory()
TestUserpublic UserHistory<Event> getTestHistory()
TestUserpublic SparseVector getPredictions()
TestUsernull if the algorithmInfo
does not support rating prediction.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)public LenskitRecommender getRecommender()
TestUser