public abstract static class ItemSelector.ItemSelectScript
extends groovy.lang.Script
Base class defining the environment in which item selectors are evaluated.
Constructor and Description |
---|
ItemSelectScript() |
Modifier and Type | Method and Description |
---|---|
LongSortedArraySet |
getAllItems()
Get the set of all items.
|
Recommender |
getRecommender()
Get the recommender object.
|
LongSet |
getUnseenItems(TestUser user)
Method that returns all items except the ones present in the user’s test or train sets.
|
TestUser |
getUser()
Get the user being tested.
|
LongSet |
pickRandom(java.util.Set<java.lang.Long> items,
int n)
Pick a random subset of a set of items.
|
LongSet |
randomUnseen(TestUser user,
int n) |
public Recommender getRecommender()
Get the recommender object.
public LongSortedArraySet getAllItems()
Get the set of all items.
public TestUser getUser()
Get the user being tested.
public LongSet pickRandom(java.util.Set<java.lang.Long> items, int n)
Pick a random subset of a set of items.
items
- The set of items to pick from.n
- the number of items to select.items
of size at most n
.public LongSet getUnseenItems(TestUser user)
Method that returns all items except the ones present in the user’s test or train sets.