lenskit.splitting.LastN ======================= .. py:class:: lenskit.splitting.LastN(n, field = 'timestamp') :canonical: lenskit.splitting._holdout.LastN Bases: :py:obj:`HoldoutMethod` Select a fixed number of test rows per user/item, based on ordering by a field. :Stability: Caller :param n: The number of test items to select. :param field: The field to order by. .. py:attribute:: n :type: int .. py:attribute:: field :type: str .. py:method:: __call__(items) Subset an item list (in the uncommon case of item-based holdouts, the item list actually holds user IDs). :param udf: The item list from which holdout items should be selected. :returns: The list of test items.