lenskit.splitting.HoldoutMethod#

class lenskit.splitting.HoldoutMethod#

Bases: Protocol

Holdout methods select test rows for a user (or occasionally an item). Partition methods are callable; when called with a data frame, they return the test entries.

Stability:
Caller (see Stability Levels).
abstractmethod __call__(items)#

Subset an item list (in the uncommon case of item-based holdouts, the item list actually holds user IDs).

Parameters:
Returns:

The list of test items.

Return type:

lenskit.data.ItemList