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 |
---|---|
LongSet |
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(Set<Long> items,
int n)
Pick a random subset of a set of items.
|
public Recommender getRecommender()
Get the recommender object.
public LongSet getAllItems()
Get the set of all items.
public TestUser getUser()
Get the user being tested.
public LongSet pickRandom(Set<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
.