lenskit.splitting.TTSplit#

class lenskit.splitting.TTSplit(train, test, name=None)#

Bases: Generic[TK]

A train-test set from splitting or other sources.

Stability:
Caller (see Stability Levels).
Parameters:
__init__(train, test, name=None)#
Parameters:
Return type:

None

Methods

__init__(train, test[, name])

Attributes

name

A name for this train-test split.

test_df

Get the test data as a data frame.

test_size

Get the number of test pairs.

train_df

Get the training data as a data frame.

train

The training data.

test

The test data.

train: Dataset#

The training data.

test: ItemListCollection[TK]#

The test data.

name: str | None = None#

A name for this train-test split.

property test_size: int#

Get the number of test pairs.

property test_df: DataFrame#

Get the test data as a data frame.

property train_df: DataFrame#

Get the training data as a data frame.