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