Combining Microprediction and TimeMachines

Crawlers that use the TimeMachines package are called skaters. 

The StreamSkater Class

New to the microprediction package is the StreamSkater class. This provides one way to use the TimeMachines package inside a MicroCrawler. An example is provided by shoal gazelle, one of the many crawler examples provided in the microprediction package. 


(Photo by Roger Erdvig Chobe National Park, Botswana.) 

Check out Shoal Gazelle and let us know if you have difficulty adapting the example. You should be able to include any model from the TimeMachines package with ease.

The caveat is that this package only provides point estimates and anticipated standard errors, so depending on the stream you may still have work to do creating a plausible distributional prediction.

The TimeMachines package

The TimeMachines package allows you to use popular forecasting packages with one line of code. It also powers Elo ratings for point estimates.  It is recommended that you read the timemachines to grok the SKATER signature. It has the following benefits:

  • Simple canonical use of some functionality from packages like fbprophet, pmdarima, tsa and their ilk.

  • Simple k-step ahead forecasts in functional style involving one line of code.

  • Simple tuning with one line of code facilitated by HumpDay, which provides canonical functional use of scipy.optimize, ax-platform, hyperopt, optuna, platypus, pymoo, pySOT, skopt, dlib, nlopt, bayesian-optimization, nevergrad and more.

  • Simple evaluation with one line of code using metrics like RMSE or energy distances.

  • Simple stacking of models with one line of code. The functional form makes other types of model combination easy as well.

  • Simpler deployment. There is no state, other that that explicitly returned to the caller. For many models state is a pure Python dictionary and thus trivially converted to JSON and back.

We recommend you read the README to understand how the package is used. 

Elo ratings

The TimeMachines package also provides Elo ratings for most of the time-series prediction methods therein. The TimeMachines residual leaderboards are produced using only z-streams. 

Ensembling, Stacking, Residuals...

The TimeMachines package contains some utilities that allow you to create ensemble models, or stack on a residual model, or do other things, typically using one line of code. See skatertools/composition for a stacking example (though the usage example in skaters/simple/ might be easiest to follow and mimic). 

New here?

We're trying to solve the last mile problem of time-series analysis.

Looking to write papers?

See Python module 1 for instructions on how to let your model roam a world of live time-series. 

Python Modules