lenskit.splitting.LastN#

class lenskit.splitting.LastN(n, field='timestamp')#

Bases: HoldoutMethod

Select a fixed number of test rows per user/item, based on ordering by a field.

Parameters:
  • n (int) – The number of test items to select.

  • field (str) – The field to order by.

__init__(n, field='timestamp')#
Parameters:

Methods

__init__(n[, field])

Attributes

n

field