lenskit.splitting.TTSplit#
- class lenskit.splitting.TTSplit(train, test)#
Bases:
Generic
[TK
]A train-test set from splitting or other sources.
- Parameters:
train (Dataset)
test (ItemListCollection[TK])
- __init__(train, test)#
- Parameters:
train (Dataset)
test (ItemListCollection[TK])
- Return type:
None
Methods
__init__
(train, test)from_src_and_test
(src, test)Create a split by subtracting test data from a source dataset.
Attributes
Get the test data as a data frame.
Get the number of test pairs.
Get the training data as a data frame.
The training data.
The test data.
- test: ItemListCollection[TK]#
The test data.
- classmethod from_src_and_test(src, test)#
Create a split by subtracting test data from a source dataset.
- Parameters:
src (Dataset)
test (ItemListCollection[TK])
- Return type:
TTSplit[TK]