lenskit.splitting.TTSplit ========================= .. py:class:: lenskit.splitting.TTSplit :canonical: lenskit.splitting._split.TTSplit A train-test set from splitting or other sources. .. versionchanged:: 2026.1 Added the :attr:`test_requests` property. :Stability: Caller .. py:attribute:: train :type: lenskit.data.Dataset The training data. .. py:attribute:: test :type: lenskit.data.ItemListCollection The test data. .. py:attribute:: name :type: str | None :value: None A name for this train-test split. .. py:property:: test_size :type: int Get the number of test pairs. .. py:property:: test_df :type: pandas.DataFrame Get the test data as a data frame. .. py:property:: train_df :type: pandas.DataFrame Get the training data as a data frame. .. py:property:: test_requests :type: lenskit.batch.TestRequestAdapter Get the test data as a sequence of batch recommendation requests. .. seealso:: :ref:`batch-queries` :returns: An collection that iterates over recommendation requests derived from the test data.