# Splits for Time and Groups

Shuffled folds assume every row is independent of the others, which isn't true for data in time order, where shuffling lets a model learn from the future, or for data with repeats, where the same customer lands on both sides; TimeSeriesSplit always tests on rows that come after the ones it learned from, and GroupKFold keeps each group on one side.

![Cheat sheet: Splits for Time and Groups](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/50fe77e38fa54f1c80cedba651f7a152.webp)

- Category: Machine Learning
- Level: Freelancer
- Tags: ai, Cross-Validation, Data Leakage, python, Time Series
- Author: Gregor Dzierzon
- Updated: November 23, 2026

Source: https://www.ask-codey.com/cheat-sheets/ml-splits-for-time-and-groups-cheat-sheet
