lenskit.splitting.split_global_time#
- lenskit.splitting.split_global_time(data: Dataset, time: int | float | str | datetime, end: int | float | str | datetime | None = None) TTSplit #
- lenskit.splitting.split_global_time(data: Dataset, time: Sequence[int | float | str | datetime], end: int | float | str | datetime | None = None) list[TTSplit]
Global temporal train-test split. This splits a data set into train/test pairs using a single global timestamp. When given multiple timestamps, it will return multiple splits, where split
has training data from before and testing data on or after and before (the last split has no upper bound on the testing data).- Stability:
- Caller (see Stability Levels).
- Parameters:
data – The dataset to split.
time – Time or sequence of times at which to split. Strings must be in ISO format.
end – A final cutoff time for the testing data.
- Returns:
The data splits.