Time-based k-fold validation splits for heterogeneous data.
Folds plotted on a two-by-two grid. See the examples page for more.
A library for creating time-based cross-validation splits of heterogeneous data, such as raw transaction data with strong non-stationary characteristics.
- Splitting schedules based on a fixed interval, a CRON-expression, or a pre-defined list.
- Data selection based on a timedelta, or the splitting schedule itself.
- Automatically extract and normalize data limits for supported data types.
- Plotting function for visualization of folds. Display fold sizes (hour/row count), or use custom text.
-
Integrations for popular
libraries such as
pandas
,polars
andscikit-learn
.
The package is published through the Python Package Index (PyPI). Source code is available on GitHub: https://github.com/rsundqvist/time-split
pip install -U time-split
This is the preferred method to install time-split
, as it will always install the
most recent stable release.
If you don't have pip installed, this Python installation guide can guide you through the process.
Hosted on Read the Docs: https://time-split.readthedocs.io
All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome. To get started, see the Contributing Guide and Code of Conduct.