# Time Split <!-- omit in toc -->
Time-based k-fold validation splits for heterogeneous data.
-----------------
[](https://pypi.python.org/pypi/time-split)
[](https://pypi.python.org/pypi/time-split)
[](https://github.com/rsundqvist/time-split/actions?workflow=tests)
[](https://codecov.io/gh/rsundqvist/time-split)
[](https://time-split.readthedocs.io/)
[](https://pypi.python.org/pypi/time-split)
[](https://hub.docker.com/r/rsundqvist/time-split/)
<div align="center">
<img alt="Plotted folds on a two-by-two grid."
title="Examples" height="300" width="1200"
src="https://raw.githubusercontent.com/rsundqvist/time-split/master/docs/2x2-examples.jpg"><br>
</div>
Folds plotted on a two-by-two grid. See the
[examples](https://time-split.readthedocs.io/en/stable/auto_examples/index.html) page for more.
## What is it?
A library for creating time-based cross-validation splits of _heterogeneous_ data, such as raw transaction data with
strong non-stationary characteristics.
## Highlighted Features
- [Splitting schedules](https://time-split.readthedocs.io/en/stable/guide/schedules.html) based on a fixed interval,
a CRON-expression, or a pre-defined list.
- [Data selection](https://time-split.readthedocs.io/en/stable/guide/spans.html) based on a timedelta, or the splitting
schedule itself.
- Automatically extract and [normalize](https://time-split.readthedocs.io/en/stable/guide/expand_limits.html) data limits for
supported data types.
- [Plotting function](https://time-split.readthedocs.io/en/stable/api/time_split.html#time_split.plot) for
visualization of folds. Display fold sizes (hour/row count), or
[use custom text](https://time-split.readthedocs.io/en/stable/auto_examples/plotting_with_metrics.html).
- [Integrations](https://time-split.readthedocs.io/en/stable/api/time_split.integration.html) for popular
libraries such as `pandas`, `polars` and `scikit-learn`.
- Convenient [web application](#experimenting-with-parameters) for exploring folds with different parameters.
## Experimenting with parameters
The **Time Split** application
(available [here](https://time-split.streamlit.app/?data=1554942900-1557610200&schedule=0+0+%2A+%2A+MON%2CFRI&n_splits=2&step=2&show_removed=True))
is designed to help evaluate the effects of different
[parameters](https://time-split.readthedocs.io/en/stable/#parameter-overview).
To start it locally, run
```sh
docker run -p 8501:8501 rsundqvist/time-split
```
or
```bash
pip install time-split[app]
python -m time_split app start
```
in the terminal. You may use
[`create_explorer_link()`](https://time-split.readthedocs.io/en/stable/api/time_split.app.html#time_split.app.create_explorer_link)
to build application URLs with preselected splitting parameters.
Click [here](https://time-split.readthedocs.io/en/stable/api/time_split.app.reexport.html) for documentation of the most
important types, functions and classes used by the application.
## Installation
The package is published through the [Python Package Index (PyPI)]. Source code
is available on GitHub: https://github.com/rsundqvist/time-split
```sh
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.
## License
[MIT](LICENSE.md)
## Documentation
Hosted on Read the Docs: https://time-split.readthedocs.io
## Contributing
All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome. To get
started, see the [Contributing Guide](CONTRIBUTING.md) and [Code of Conduct](CODE_OF_CONDUCT.md).
[Python Package Index (PyPI)]: https://pypi.org/project/time-split
[pip]: https://pip.pypa.io
[Python installation guide]: http://docs.python-guide.org/en/stable/starting/installation/
Raw data
{
"_id": null,
"home_page": null,
"name": "time-split",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "hyper, parameter, optimization, cross, validation, time, temporal, heterogenous, data",
"author": "Richard Sundqvist",
"author_email": "richard.sundqvist@live.se",
"download_url": "https://files.pythonhosted.org/packages/41/c4/8f6e67cbd9867aa3d435e95f80c47c362edd67dd6b2a9ad3986a7d2e3e7b/time_split-0.7.1.tar.gz",
"platform": null,
"description": "# Time Split <!-- omit in toc -->\nTime-based k-fold validation splits for heterogeneous data.\n\n-----------------\n[](https://pypi.python.org/pypi/time-split)\n[](https://pypi.python.org/pypi/time-split)\n[](https://github.com/rsundqvist/time-split/actions?workflow=tests)\n[](https://codecov.io/gh/rsundqvist/time-split)\n[](https://time-split.readthedocs.io/)\n[](https://pypi.python.org/pypi/time-split)\n[](https://hub.docker.com/r/rsundqvist/time-split/)\n\n<div align=\"center\">\n <img alt=\"Plotted folds on a two-by-two grid.\" \n title=\"Examples\" height=\"300\" width=\"1200\" \n src=\"https://raw.githubusercontent.com/rsundqvist/time-split/master/docs/2x2-examples.jpg\"><br>\n</div>\n\nFolds plotted on a two-by-two grid. See the\n[examples](https://time-split.readthedocs.io/en/stable/auto_examples/index.html) page for more.\n\n## What is it?\nA library for creating time-based cross-validation splits of _heterogeneous_ data, such as raw transaction data with \nstrong non-stationary characteristics.\n\n## Highlighted Features\n- [Splitting schedules](https://time-split.readthedocs.io/en/stable/guide/schedules.html) based on a fixed interval, \n a CRON-expression, or a pre-defined list.\n- [Data selection](https://time-split.readthedocs.io/en/stable/guide/spans.html) based on a timedelta, or the splitting \n schedule itself.\n- Automatically extract and [normalize](https://time-split.readthedocs.io/en/stable/guide/expand_limits.html) data limits for \n supported data types.\n- [Plotting function](https://time-split.readthedocs.io/en/stable/api/time_split.html#time_split.plot) for\n visualization of folds. Display fold sizes (hour/row count), or \n [use custom text](https://time-split.readthedocs.io/en/stable/auto_examples/plotting_with_metrics.html).\n- [Integrations](https://time-split.readthedocs.io/en/stable/api/time_split.integration.html) for popular \n libraries such as `pandas`, `polars` and `scikit-learn`.\n- Convenient [web application](#experimenting-with-parameters) for exploring folds with different parameters.\n\n## Experimenting with parameters\nThe **Time Split** application\n(available [here](https://time-split.streamlit.app/?data=1554942900-1557610200&schedule=0+0+%2A+%2A+MON%2CFRI&n_splits=2&step=2&show_removed=True))\nis designed to help evaluate the effects of different\n[parameters](https://time-split.readthedocs.io/en/stable/#parameter-overview).\nTo start it locally, run\n```sh\ndocker run -p 8501:8501 rsundqvist/time-split\n```\nor \n```bash\npip install time-split[app]\npython -m time_split app start\n```\nin the terminal. You may use\n[`create_explorer_link()`](https://time-split.readthedocs.io/en/stable/api/time_split.app.html#time_split.app.create_explorer_link)\nto build application URLs with preselected splitting parameters.\n\nClick [here](https://time-split.readthedocs.io/en/stable/api/time_split.app.reexport.html) for documentation of the most\nimportant types, functions and classes used by the application.\n\n## Installation\nThe package is published through the [Python Package Index (PyPI)]. Source code\nis available on GitHub: https://github.com/rsundqvist/time-split\n\n```sh\npip install -U time-split\n```\n\nThis is the preferred method to install ``time-split``, as it will always install the\nmost recent stable release.\n\nIf you don't have [pip] installed, this [Python installation guide] can guide\nyou through the process.\n\n## License\n[MIT](LICENSE.md)\n\n## Documentation\nHosted on Read the Docs: https://time-split.readthedocs.io\n\n## Contributing\n\nAll contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome. To get \nstarted, see the [Contributing Guide](CONTRIBUTING.md) and [Code of Conduct](CODE_OF_CONDUCT.md).\n\n[Python Package Index (PyPI)]: https://pypi.org/project/time-split\n[pip]: https://pip.pypa.io\n[Python installation guide]: http://docs.python-guide.org/en/stable/starting/installation/\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Time-based k-fold validation splits for heterogeneous data.",
"version": "0.7.1",
"project_urls": {
"Bug Tracker": "https://github.com/rsundqvist/time-split/issues",
"Changelog": "https://github.com/rsundqvist/time-split/blob/master/CHANGELOG.md",
"Documentation": "https://time-split",
"Homepage": "https://github.com/rsundqvist/time-split",
"Repository": "https://github.com/rsundqvist/time-split"
},
"split_keywords": [
"hyper",
" parameter",
" optimization",
" cross",
" validation",
" time",
" temporal",
" heterogenous",
" data"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "9a3fad391885211748782447a20a483c3b0582921ebaff5895e97ecc452f8d19",
"md5": "95e3c6aeaacbd824a2c0c436f0fe364b",
"sha256": "f12a19354bd321381676d34d0b73c34a50376fe68bb4e88234261996d6c0c5f2"
},
"downloads": -1,
"filename": "time_split-0.7.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "95e3c6aeaacbd824a2c0c436f0fe364b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 44081,
"upload_time": "2025-07-17T10:29:35",
"upload_time_iso_8601": "2025-07-17T10:29:35.219686Z",
"url": "https://files.pythonhosted.org/packages/9a/3f/ad391885211748782447a20a483c3b0582921ebaff5895e97ecc452f8d19/time_split-0.7.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "41c48f6e67cbd9867aa3d435e95f80c47c362edd67dd6b2a9ad3986a7d2e3e7b",
"md5": "7c92f81cf8e82fd63830081aaba04bc3",
"sha256": "ac1ea9f6370d7387cf71aaf02a550964f25dfc6224dda355eefa3267619c92ef"
},
"downloads": -1,
"filename": "time_split-0.7.1.tar.gz",
"has_sig": false,
"md5_digest": "7c92f81cf8e82fd63830081aaba04bc3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 33038,
"upload_time": "2025-07-17T10:29:36",
"upload_time_iso_8601": "2025-07-17T10:29:36.456881Z",
"url": "https://files.pythonhosted.org/packages/41/c4/8f6e67cbd9867aa3d435e95f80c47c362edd67dd6b2a9ad3986a7d2e3e7b/time_split-0.7.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-17 10:29:36",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "rsundqvist",
"github_project": "time-split",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"lcname": "time-split"
}