Skip to main content

Evaluation and standardization of autonomous time series prediction

Project description

timemachines simplepycarettsa successor darts greykite sktime tbats simdkalman prophet statsforecastorbit neuralprophet pmd pydlm merlion merlion-prophet river divinitypycaret License: MIT

Simple prediction functions (documented and assessed)

Because why not do things in walk-forward incremental fashion with one line of code? Here yt is a vector or scalar, and we want to predict yt (or its first coordinate if a vector) three steps in advance.

 from timemachines.skaters.somepackage.somevariety import something as f
 for yt in y:
     xt, xt_std, s = f(y=yt, s=s, k=3)

This emits a k-vector xt of forecasts, and corresponding k-vector xt_std of estimated standard errors. See skaters for choices of somepackage, somevariety and something. You can also ensemble, compose, bootstrap and do other things with one line of code.

See the docs.

Packages used

Skaters draw on functionality from popular python time-series packages like river, pydlm, tbats, pmdarima, statsmodels.tsa, neuralprophet, Facebook Prophet, Uber's orbit, Facebook's greykite and more. See the docs.

What's a "skater"?

More abstractly:

$$ f : (y_t, state; k) \mapsto ( [\hat{y}(t+1),\hat{y}(t+2),\dots,\hat{y}(t+k) ], [\sigma(t+1),\dots,\sigma(t+k)], posterior\ state)) $$

where $\sigma(t+l)$ estimates the standard error of the prediction $\hat{y}(t+l)$.

If you prefer an legitimate (i.e. stateful) state machine, see FAQ question 1.

Skater function conventions

See docs/interface for description of skater inputs and outputs. Briefly:

  x, w, s = f(   y:Union[float,[float]],             # Contemporaneously observerd data, 
                                                     # ... including exogenous variables in y[1:], if any. 
            s=None,                                  # Prior state
            k:float=1,                               # Number of steps ahead to forecast. Typically integer. 
            a:[float]=None,                          # Variable(s) known in advance, or conditioning
            t:float=None,                            # Time of observation (epoch seconds)
            e:float=None,                            # Non-binding maximal computation time ("e for expiry"), in seconds
            r:float=None)                            # Hyper-parameters ("r" stands for for hype(r)-pa(r)amete(r)s) 

Contributions and capstone projects

Getting live help

  • FAQ.
  • See the Slack invite on my user page here.
  • Office hours here.
  • Learn how to deploy some of these models and try to win the daily $125 prize.

Install instructions

Oh what a mess the Python timeseries ecosystem is. So packages are not installed by default. See the methodical install instructions and be incremental for best results. The infamous xkcd cartoon really does describe the alternative quite well.

Cite

Thanks

    @electronic{cottontimemachines,
        title = {{Timemachines: A Python Package for Creating and Assessing Autonomous Time-Series Prediction Algorithms}},
        year = {2021},
        author = {Peter Cotton},
        url = {https://github.com/microprediction/timemachines}
    }

or something here.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

timemachines-0.20.5.tar.gz (97.7 kB view details)

Uploaded Source

Built Distribution

timemachines-0.20.5-py3-none-any.whl (160.5 kB view details)

Uploaded Python 3

File details

Details for the file timemachines-0.20.5.tar.gz.

File metadata

  • Download URL: timemachines-0.20.5.tar.gz
  • Upload date:
  • Size: 97.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.0

File hashes

Hashes for timemachines-0.20.5.tar.gz
Algorithm Hash digest
SHA256 4e53e84679b432c0e09ab55db006a618887e073955f2555d8a2f8fa4854bfe68
MD5 3381c8d99e5e39932835d0e163423891
BLAKE2b-256 dd1bab418796cd69a1f7d185decc83aed7da41cd1b2e5f04185c954342e08f2f

See more details on using hashes here.

File details

Details for the file timemachines-0.20.5-py3-none-any.whl.

File metadata

File hashes

Hashes for timemachines-0.20.5-py3-none-any.whl
Algorithm Hash digest
SHA256 2cea3b6a451c6f43026b7ff6fcd45288274f54315afbe2669e1ffcf946e951c1
MD5 cd611681d00aa70097335fee3e36d436
BLAKE2b-256 e5c7a2f2c85283d1f2a7c9d31e15395008e959455de4892f16685702feabba5d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page