fold-core


Namefold-core JSON
Version 2.0.1 PyPI version JSON
download
home_page
SummaryA Time Series Cross-Validation library that lets you build, deploy and update composite models easily. An order of magnitude speed-up, combined with flexibility and rigour.
upload_time2024-02-29 15:16:07
maintainer
docs_urlNone
authorMark Aron Szulyovszky
requires_python>=3.11,<4.0
licenseProprietary
keywords time-series machine-learning forecasting forecast nowcast models time-series-regression time-series-classification financial-machine-learning
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <!-- # fold -->

<p align="center" style="display:flex; width:100%; align-items:center; justify-content:center;">
  <a style="margin:2px" href="https://dream-faster.github.io/fold/"><img alt="Docs" src="https://img.shields.io/github/actions/workflow/status/dream-faster/fold/docs.yaml?logo=readthedocs"></a>
  <a style="margin:2px" href="https://codecov.io/gh/dream-faster/fold" ><img src="https://codecov.io/gh/dream-faster/fold/branch/main/graph/badge.svg?token=Z7I2XSF188"/></a>
  <a style="margin:2px" href="https://github.com/dream-faster/fold/actions/workflows/tests.yaml"><img alt="Tests" src="https://github.com/dream-faster/fold/actions/workflows/tests.yaml/badge.svg"/></a>
  <a style="margin:2px" href="https://discord.gg/EKJQgfuBpE"><img alt="Discord Community" src="https://img.shields.io/badge/Discord-%235865F2.svg?logo=discord&logoColor=white"></a>
</p>

<!-- PROJECT LOGO -->
<br />
<div align="center">
  <a href="https://dream-faster.github.io/fold/">
    <img src="https://raw.githubusercontent.com/dream-faster/fold/main/docs/images/logo.svg" alt="Logo" width="90" >
  </a>
<h3 align="center"><b>FOLD</b><br></h3>
  <p align="center">
    Fast <b>Adaptive Time Series ML </b> Engine
    <br/>
    <b>This is an internal project - documentation is not updated anymore and substantially differ from the current API.</b>
    <a href="https://dream-faster.github.io/fold/"><strong>Explore the docs »</strong></a>
  </p>
</div>
<br />

<!-- INTRO -->

![Adaptive Models](https://raw.githubusercontent.com/dream-faster/fold/main/docs/images/overview_diagrams/main_diagram.svg)

The<b> <a href="https://dream-faster.github.io/fold/concepts/adaptive-ml/">Adaptive ML Engine</a></b> that lets you <b>build</b>, <b>deploy and update</b> Models easily. An order of magnitude speed-up, combined with flexibility and rigour.</b>
<br/>



![Fold works with many third party libraries](https://raw.githubusercontent.com/dream-faster/fold/main/docs/images/overview_diagrams/third_party.svg)

<!-- GETTING STARTED -->

## Main Features

![Fold's main features](https://raw.githubusercontent.com/dream-faster/fold/main/docs/images/overview_diagrams/main_features.svg)

- 10x faster Adaptive Backtesting - [What does that mean?](https://dream-faster.github.io/fold/concepts/adaptive-ml/)
- Composite Models made Adaptive - [What does that mean?](https://dream-faster.github.io/fold/concepts/adaptive-ml/)
- Distributed computing - [Why is this important?](#Fold-is-different)
- Update deployed models (coming in May) - [Why is this important?](#Fold-is-different)


## Installation

- Prerequisites: `python >= 3.8` and `pip`

- Install from pypi:
  ```
  pip install fold-core
  ```

## Quickstart

You can quickly train your chosen models and get predictions by running:

```py
from sklearn.ensemble import RandomForestRegressor
from statsforecast.models import ARIMA
from fold import ExpandingWindowSplitter, train_evaluate
from fold.composites import Ensemble
from fold.transformations import OnlyPredictions
from fold.utils.dataset import get_preprocessed_dataset

X, y = get_preprocessed_dataset(
    "weather/historical_hourly_la", target_col="temperature", shorten=1000
)

pipeline = [
    Ensemble(
        [
            RandomForestRegressor(),
            ARIMA(order=(1, 1, 0)),
        ]
    ),
    OnlyPredictions(),
]
splitter = ExpandingWindowSplitter(initial_train_window=0.2, step=0.2)
scorecard, prediction, trained_pipelines, _, _ = train_evaluate(pipeline, X, y, splitter)
```


(If you install `krisi` by running `pip install krisi` you get an extended report back, rather than a single metric.)

## Fold is different

- Adaptive Models and Backtesting at lightning speed.<br/>
  <span style="color:orange;">**→ fold allows to simulate and evaluate your models like they would have performed, in reality/when deployed, with clever use of paralellization and design.**</span>

- Create composite models: ensembles, hybrids, stacking pipelines, easily.<br/>
  <span style="color:orange;">**→ Underutilized, but [the easiest, fastest way to increase performance of your Time Series models.](https://linkinghub.elsevier.com/retrieve/pii/S0169207022001480)**
  </span>

- Built with Distributed Computing in mind.<br/>
  <span style="color:orange;">**→ Deploy your research and development pipelines to a cluster with `ray`, and use `modin` to handle out-of-memory datasets (full support for modin is coming in April).**</span>

- Bridging the gap between Online and Mini-Batch learning.<br/>
  <span style="color:orange;">**→ Mix and match `xgboost` with ARIMA, in a single pipeline. Boost your model's accuracy by updating them on every timestamp, if desired.**</span>

- Update your deployed models, easily, as new data flows in.<br/>
  <span style="color:orange;">**→ Real world is not static. Let your models adapt, without the need to re-train from scratch.**</span>

<!-- GETTING STARTED -->

## Examples, Walkthroughs and Blog Posts

<table style="width:100%">
  <tr>
    <th>Name</th>
    <th>Type</th>
    <th>Dataset Type</th>
    <th>Docs Link</th>
    <th>Colab</th>
  </tr>
  <tr>
    <td> 
     ⚡️ Core Walkthrough
    </td>
    <td>Walkthrough</td>
    <td>Energy</td>
    <td>  
      <a href='https://dream-faster.github.io/fold/walkthroughs/core_walkthrough/' target="_blank">Notebook</a>
    </td>
    <td>
     <a href='https://colab.research.google.com/drive/1CVhxOmbHO9PvsdHfGvR91ilJUqEnUuy8?usp=sharing' target="_blank">Colab</a>
    </td>
  </tr>
  <tr>
    <td> 
    🚄 Speed Comparison of Fold to other libraries
    </td>
    <td>Walkthrough</td>
    <td>Weather</td>
    <td> 
        <a href='https://dream-faster.github.io/fold/walkthroughs/benchmarking_sktime_fold/' target="_blank">
        Notebook
        </a>
    </td>
    <td>
        <a href='https://colab.research.google.com/drive/1iLXpty-j1kpDCzLM4fCsP3fLoS_DFN1C?usp=sharing' target="_blank"> 
        Colab
        </a>
    </td>
  </tr>
  <tr>
    <td> 
    📚 Example Collection
    </td>
    <td>Example</td>
    <td>Weather & Synthetic</td>
    <td> 
        <a href='https://dream-faster.github.io/fold/generated/gallery/' target="_blank">
        Collection Link
        </a>
    </td>
    <td> - </td>
  </tr>
  <tr>
    <td> 
    🖋️ Why we ended up building an Adaptive ML engine for Time Series
    </td>
    <td>Blog</td>
    <td>Public Release Blog Post </td>
    <td> 
        <a href='https://www.appliedexploration.com/p/back-to-the-future-with-time-series' target="_blank">
        Blog post on Applied Exploration 
        </a>
    </td>
    <td> - </td>

  </tr>
</table>

<br/>

## Core Features

- Supports both Regression and Classification tasks.
- Online and Mini-batch learning.
- Feature selection and other transformations on an expanding/rolling window basis
- Use any scikit-learn/tabular model natively!
- Use any univariate or sequence models (wrappers provided in [fold-wrappers](https://github.com/dream-faster/fold-wrappers)).
- Use any Deep Learning Time Series models (wrappers provided in [fold-wrappers](https://github.com/dream-faster/fold-wrappers)).
- Super easy syntax!
- Probabilistic foreacasts (currently, for Classification, full support coming in April).
- Hyperparemeter optimization / Model selection. (coming in early April!)

## What is Adaptive Backtesting?

![Adaptive Backtesting](https://raw.githubusercontent.com/dream-faster/fold/main/docs/images/technical_diagrams/continous_validation.svg)

It's like classical Backtesting / Time Series Cross-Validation, plus: Inside a test window, and during deployment, fold provides a way for models to update their parameters or access the last value.
[Learn more](https://dream-faster.github.io/fold/concepts/adaptive-ml/)

## Our Open-core Time Series Toolkit

[![Krisi](https://raw.githubusercontent.com/dream-faster/fold/main/docs/images/overview_diagrams/dream_faster_suite_krisi.svg)](https://github.com/dream-faster/krisi)
[![Fold](https://raw.githubusercontent.com/dream-faster/fold/main/docs/images/overview_diagrams/dream_faster_suite_fold.svg)](https://github.com/dream-faster/fold)


[Explore our Commercial License options here](https://dream-faster.github.io/fold/product/pricing)

## Contribution

Join our   <a style="margin:2px" href="https://discord.gg/EKJQgfuBpE"><img alt="Discord Community" src="https://img.shields.io/badge/Discord-%235865F2.svg?logo=discord&logoColor=white"></a> for live discussion! 

Submit an issue or reach out to us on info at dream-faster.ai for any inquiries.

## Licence & Usage

We want to **bring much-needed transparency, speed and rigour** to the process of creating Time Series ML pipelines, while also building a sustainable business, that can support the ecosystem in the long-term.
Fold's licence is inbetween [source-available](https://en.wikipedia.org/wiki/Source-available_software) and a traditional commercial software licence. It requires a paid licence for any commercial use, after the initial, 30 day trial period.

We also want to contribute to open research by giving free access to non-commercial, research use of `fold`. 

[Read more](https://dream-faster.github.io/fold/product/license/)

## Limitations

- No intermittent time series support, very limited support for missing values.
- No hierarchical time series support.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "fold-core",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.11,<4.0",
    "maintainer_email": "",
    "keywords": "time-series,machine-learning,forecasting,forecast,nowcast,models,time-series-regression,time-series-classification,financial-machine-learning",
    "author": "Mark Aron Szulyovszky",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/c6/e4/dccbdd4b27de8c79ab1625e02ba08c07ce8de4412d2420fc57a180a871d1/fold_core-2.0.1.tar.gz",
    "platform": null,
    "description": "<!-- # fold -->\n\n<p align=\"center\" style=\"display:flex; width:100%; align-items:center; justify-content:center;\">\n  <a style=\"margin:2px\" href=\"https://dream-faster.github.io/fold/\"><img alt=\"Docs\" src=\"https://img.shields.io/github/actions/workflow/status/dream-faster/fold/docs.yaml?logo=readthedocs\"></a>\n  <a style=\"margin:2px\" href=\"https://codecov.io/gh/dream-faster/fold\" ><img src=\"https://codecov.io/gh/dream-faster/fold/branch/main/graph/badge.svg?token=Z7I2XSF188\"/></a>\n  <a style=\"margin:2px\" href=\"https://github.com/dream-faster/fold/actions/workflows/tests.yaml\"><img alt=\"Tests\" src=\"https://github.com/dream-faster/fold/actions/workflows/tests.yaml/badge.svg\"/></a>\n  <a style=\"margin:2px\" href=\"https://discord.gg/EKJQgfuBpE\"><img alt=\"Discord Community\" src=\"https://img.shields.io/badge/Discord-%235865F2.svg?logo=discord&logoColor=white\"></a>\n</p>\n\n<!-- PROJECT LOGO -->\n<br />\n<div align=\"center\">\n  <a href=\"https://dream-faster.github.io/fold/\">\n    <img src=\"https://raw.githubusercontent.com/dream-faster/fold/main/docs/images/logo.svg\" alt=\"Logo\" width=\"90\" >\n  </a>\n<h3 align=\"center\"><b>FOLD</b><br></h3>\n  <p align=\"center\">\n    Fast <b>Adaptive Time Series ML </b> Engine\n    <br/>\n    <b>This is an internal project - documentation is not updated anymore and substantially differ from the current API.</b>\n    <a href=\"https://dream-faster.github.io/fold/\"><strong>Explore the docs \u00bb</strong></a>\n  </p>\n</div>\n<br />\n\n<!-- INTRO -->\n\n![Adaptive Models](https://raw.githubusercontent.com/dream-faster/fold/main/docs/images/overview_diagrams/main_diagram.svg)\n\nThe<b> <a href=\"https://dream-faster.github.io/fold/concepts/adaptive-ml/\">Adaptive ML Engine</a></b> that lets you <b>build</b>, <b>deploy and update</b> Models easily. An order of magnitude speed-up, combined with flexibility and rigour.</b>\n<br/>\n\n\n\n![Fold works with many third party libraries](https://raw.githubusercontent.com/dream-faster/fold/main/docs/images/overview_diagrams/third_party.svg)\n\n<!-- GETTING STARTED -->\n\n## Main Features\n\n![Fold's main features](https://raw.githubusercontent.com/dream-faster/fold/main/docs/images/overview_diagrams/main_features.svg)\n\n- 10x faster Adaptive Backtesting - [What does that mean?](https://dream-faster.github.io/fold/concepts/adaptive-ml/)\n- Composite Models made Adaptive - [What does that mean?](https://dream-faster.github.io/fold/concepts/adaptive-ml/)\n- Distributed computing - [Why is this important?](#Fold-is-different)\n- Update deployed models (coming in May) - [Why is this important?](#Fold-is-different)\n\n\n## Installation\n\n- Prerequisites: `python >= 3.8` and `pip`\n\n- Install from pypi:\n  ```\n  pip install fold-core\n  ```\n\n## Quickstart\n\nYou can quickly train your chosen models and get predictions by running:\n\n```py\nfrom sklearn.ensemble import RandomForestRegressor\nfrom statsforecast.models import ARIMA\nfrom fold import ExpandingWindowSplitter, train_evaluate\nfrom fold.composites import Ensemble\nfrom fold.transformations import OnlyPredictions\nfrom fold.utils.dataset import get_preprocessed_dataset\n\nX, y = get_preprocessed_dataset(\n    \"weather/historical_hourly_la\", target_col=\"temperature\", shorten=1000\n)\n\npipeline = [\n    Ensemble(\n        [\n            RandomForestRegressor(),\n            ARIMA(order=(1, 1, 0)),\n        ]\n    ),\n    OnlyPredictions(),\n]\nsplitter = ExpandingWindowSplitter(initial_train_window=0.2, step=0.2)\nscorecard, prediction, trained_pipelines, _, _ = train_evaluate(pipeline, X, y, splitter)\n```\n\n\n(If you install `krisi` by running `pip install krisi` you get an extended report back, rather than a single metric.)\n\n## Fold is different\n\n- Adaptive Models and Backtesting at lightning speed.<br/>\n  <span style=\"color:orange;\">**\u2192 fold allows to simulate and evaluate your models like they would have performed, in reality/when deployed, with clever use of paralellization and design.**</span>\n\n- Create composite models: ensembles, hybrids, stacking pipelines, easily.<br/>\n  <span style=\"color:orange;\">**\u2192 Underutilized, but [the easiest, fastest way to increase performance of your Time Series models.](https://linkinghub.elsevier.com/retrieve/pii/S0169207022001480)**\n  </span>\n\n- Built with Distributed Computing in mind.<br/>\n  <span style=\"color:orange;\">**\u2192 Deploy your research and development pipelines to a cluster with `ray`, and use `modin` to handle out-of-memory datasets (full support for modin is coming in April).**</span>\n\n- Bridging the gap between Online and Mini-Batch learning.<br/>\n  <span style=\"color:orange;\">**\u2192 Mix and match `xgboost` with ARIMA, in a single pipeline. Boost your model's accuracy by updating them on every timestamp, if desired.**</span>\n\n- Update your deployed models, easily, as new data flows in.<br/>\n  <span style=\"color:orange;\">**\u2192 Real world is not static. Let your models adapt, without the need to re-train from scratch.**</span>\n\n<!-- GETTING STARTED -->\n\n## Examples, Walkthroughs and Blog Posts\n\n<table style=\"width:100%\">\n  <tr>\n    <th>Name</th>\n    <th>Type</th>\n    <th>Dataset Type</th>\n    <th>Docs Link</th>\n    <th>Colab</th>\n  </tr>\n  <tr>\n    <td> \n     \u26a1\ufe0f Core Walkthrough\n    </td>\n    <td>Walkthrough</td>\n    <td>Energy</td>\n    <td>  \n      <a href='https://dream-faster.github.io/fold/walkthroughs/core_walkthrough/' target=\"_blank\">Notebook</a>\n    </td>\n    <td>\n     <a href='https://colab.research.google.com/drive/1CVhxOmbHO9PvsdHfGvR91ilJUqEnUuy8?usp=sharing' target=\"_blank\">Colab</a>\n    </td>\n  </tr>\n  <tr>\n    <td> \n    \ud83d\ude84 Speed Comparison of Fold to other libraries\n    </td>\n    <td>Walkthrough</td>\n    <td>Weather</td>\n    <td> \n        <a href='https://dream-faster.github.io/fold/walkthroughs/benchmarking_sktime_fold/' target=\"_blank\">\n        Notebook\n        </a>\n    </td>\n    <td>\n        <a href='https://colab.research.google.com/drive/1iLXpty-j1kpDCzLM4fCsP3fLoS_DFN1C?usp=sharing' target=\"_blank\"> \n        Colab\n        </a>\n    </td>\n  </tr>\n  <tr>\n    <td> \n    \ud83d\udcda Example Collection\n    </td>\n    <td>Example</td>\n    <td>Weather & Synthetic</td>\n    <td> \n        <a href='https://dream-faster.github.io/fold/generated/gallery/' target=\"_blank\">\n        Collection Link\n        </a>\n    </td>\n    <td> - </td>\n  </tr>\n  <tr>\n    <td> \n    \ud83d\udd8b\ufe0f Why we ended up building an Adaptive ML engine for Time Series\n    </td>\n    <td>Blog</td>\n    <td>Public Release Blog Post </td>\n    <td> \n        <a href='https://www.appliedexploration.com/p/back-to-the-future-with-time-series' target=\"_blank\">\n        Blog post on Applied Exploration \n        </a>\n    </td>\n    <td> - </td>\n\n  </tr>\n</table>\n\n<br/>\n\n## Core Features\n\n- Supports both Regression and Classification tasks.\n- Online and Mini-batch learning.\n- Feature selection and other transformations on an expanding/rolling window basis\n- Use any scikit-learn/tabular model natively!\n- Use any univariate or sequence models (wrappers provided in [fold-wrappers](https://github.com/dream-faster/fold-wrappers)).\n- Use any Deep Learning Time Series models (wrappers provided in [fold-wrappers](https://github.com/dream-faster/fold-wrappers)).\n- Super easy syntax!\n- Probabilistic foreacasts (currently, for Classification, full support coming in April).\n- Hyperparemeter optimization / Model selection. (coming in early April!)\n\n## What is Adaptive Backtesting?\n\n![Adaptive Backtesting](https://raw.githubusercontent.com/dream-faster/fold/main/docs/images/technical_diagrams/continous_validation.svg)\n\nIt's like classical Backtesting / Time Series Cross-Validation, plus: Inside a test window, and during deployment, fold provides a way for models to update their parameters or access the last value.\n[Learn more](https://dream-faster.github.io/fold/concepts/adaptive-ml/)\n\n## Our Open-core Time Series Toolkit\n\n[![Krisi](https://raw.githubusercontent.com/dream-faster/fold/main/docs/images/overview_diagrams/dream_faster_suite_krisi.svg)](https://github.com/dream-faster/krisi)\n[![Fold](https://raw.githubusercontent.com/dream-faster/fold/main/docs/images/overview_diagrams/dream_faster_suite_fold.svg)](https://github.com/dream-faster/fold)\n\n\n[Explore our Commercial License options here](https://dream-faster.github.io/fold/product/pricing)\n\n## Contribution\n\nJoin our   <a style=\"margin:2px\" href=\"https://discord.gg/EKJQgfuBpE\"><img alt=\"Discord Community\" src=\"https://img.shields.io/badge/Discord-%235865F2.svg?logo=discord&logoColor=white\"></a> for live discussion! \n\nSubmit an issue or reach out to us on info at dream-faster.ai for any inquiries.\n\n## Licence & Usage\n\nWe want to **bring much-needed transparency, speed and rigour** to the process of creating Time Series ML pipelines, while also building a sustainable business, that can support the ecosystem in the long-term.\nFold's licence is inbetween [source-available](https://en.wikipedia.org/wiki/Source-available_software) and a traditional commercial software licence. It requires a paid licence for any commercial use, after the initial, 30 day trial period.\n\nWe also want to contribute to open research by giving free access to non-commercial, research use of `fold`. \n\n[Read more](https://dream-faster.github.io/fold/product/license/)\n\n## Limitations\n\n- No intermittent time series support, very limited support for missing values.\n- No hierarchical time series support.\n",
    "bugtrack_url": null,
    "license": "Proprietary",
    "summary": "A Time Series Cross-Validation library that lets you build, deploy and update composite models easily. An order of magnitude speed-up, combined with flexibility and rigour.",
    "version": "2.0.1",
    "project_urls": null,
    "split_keywords": [
        "time-series",
        "machine-learning",
        "forecasting",
        "forecast",
        "nowcast",
        "models",
        "time-series-regression",
        "time-series-classification",
        "financial-machine-learning"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6e7818ac50b23e3a1c0ea45cee650a45b1acf9e237cfd79c4125e9aebc4b62ff",
                "md5": "1b0b176415c8375b687810e6059d9f61",
                "sha256": "9664500d9246dd9414fed35fac555d201f2a341abf08398da69ece0cf17eec47"
            },
            "downloads": -1,
            "filename": "fold_core-2.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1b0b176415c8375b687810e6059d9f61",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11,<4.0",
            "size": 94045,
            "upload_time": "2024-02-29T15:16:05",
            "upload_time_iso_8601": "2024-02-29T15:16:05.774133Z",
            "url": "https://files.pythonhosted.org/packages/6e/78/18ac50b23e3a1c0ea45cee650a45b1acf9e237cfd79c4125e9aebc4b62ff/fold_core-2.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c6e4dccbdd4b27de8c79ab1625e02ba08c07ce8de4412d2420fc57a180a871d1",
                "md5": "074df70a120b64e5d7248aad17411bd7",
                "sha256": "99484231b4629616ba30f9bf3320ba48fb3bfc2e29ee36e76f5a688ce9048e91"
            },
            "downloads": -1,
            "filename": "fold_core-2.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "074df70a120b64e5d7248aad17411bd7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11,<4.0",
            "size": 59138,
            "upload_time": "2024-02-29T15:16:07",
            "upload_time_iso_8601": "2024-02-29T15:16:07.717606Z",
            "url": "https://files.pythonhosted.org/packages/c6/e4/dccbdd4b27de8c79ab1625e02ba08c07ce8de4412d2420fc57a180a871d1/fold_core-2.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-29 15:16:07",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "fold-core"
}
        
Elapsed time: 0.26884s