lenskit.splitting.SampleN#
- class lenskit.splitting.SampleN(n, rng=None)#
Bases:
HoldoutMethod
Randomly select a fixed number of test rows per user/item.
- Parameters:
n (int) – The number of test items to select.
rng (Generator) – The random number generator or seed (see Random Seeds).
- __init__(n, rng=None)#
- Parameters:
n (int)
rng (int | integer[Any] | Sequence[int] | SeedSequence | Generator | BitGenerator | None)
Methods
__init__
(n[, rng])Attributes
n
rng