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:

Methods

__init__(frac[, rng])

Attributes

fraction

rng