Skip to main content

Docs Tests Discord Community


Logo

FOLD

Fast Adaptive Time Series ML Engine
This is an internal project - documentation is not updated anymore and substantially differ from the current API. Explore the docs »


Adaptive Models

The Adaptive ML Engine that lets you build, deploy and update Models easily. An order of magnitude speed-up, combined with flexibility and rigour.

Fold works with many third party libraries

Main Features

Fold's main features

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:

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.
    → fold allows to simulate and evaluate your models like they would have performed, in reality/when deployed, with clever use of paralellization and design.

  • Create composite models: ensembles, hybrids, stacking pipelines, easily.
    → Underutilized, but the easiest, fastest way to increase performance of your Time Series models.

  • Built with Distributed Computing in mind.
    → 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).

  • Bridging the gap between Online and Mini-Batch learning.
    → Mix and match xgboost with ARIMA, in a single pipeline. Boost your model's accuracy by updating them on every timestamp, if desired.

  • Update your deployed models, easily, as new data flows in.
    → Real world is not static. Let your models adapt, without the need to re-train from scratch.

Examples, Walkthroughs and Blog Posts

Name Type Dataset Type Docs Link Colab
⚡️ Core Walkthrough Walkthrough Energy Notebook Colab
🚄 Speed Comparison of Fold to other libraries Walkthrough Weather Notebook Colab
📚 Example Collection Example Weather & Synthetic Collection Link -
🖋️ Why we ended up building an Adaptive ML engine for Time Series Blog Public Release Blog Post Blog post on Applied Exploration -

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).
  • Use any Deep Learning Time Series models (wrappers provided in 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

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

Our Open-core Time Series Toolkit

Krisi Fold

Explore our Commercial License options here

Contribution

Join our Discord Community 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 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

Limitations

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

Metadata

Release files for fold-core 2.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fold-core 2.0.1
File Size Uploaded
fold_core-2.0.1.tar.gz 59.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fold-core 2.0.1
File Interpreter ABI Platform
fold_core-2.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 153.2 kB

Release files / fold_core-2.0.1.tar.gz

Download URL fold_core-2.0.1.tar.gz
Size 59.1 kB
Tags Source
SHA-256 checksum
How to use checksums
99484231b4629616ba30f9bf3320ba48fb3bfc2e29ee36e76f5a688ce9048e91
BLAKE2b-256 checksum
How to use checksums
c6e4dccbdd4b27de8c79ab1625e02ba08c07ce8de4412d2420fc57a180a871d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.1 CPython/3.12.2 Linux/6.5.0-1015-azure

Release files / fold_core-2.0.1-py3-none-any.whl

Download URL fold_core-2.0.1-py3-none-any.whl
Size 94.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9664500d9246dd9414fed35fac555d201f2a341abf08398da69ece0cf17eec47
BLAKE2b-256 checksum
How to use checksums
6e7818ac50b23e3a1c0ea45cee650a45b1acf9e237cfd79c4125e9aebc4b62ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.1 CPython/3.12.2 Linux/6.5.0-1015-azure

Release history Release notifications | RSS feed

This release

2.0.1 This release

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page