High level forecasting API for augurs
augurs-forecaster contains a high-level API for training and predicting with time series models. It currently allows you to combine a model with a set of transformations (such as imputation of missing data, min-max scaling, and log/logit transforms) and fit the model on the transformed data, automatically handling back-transformation of forecasts and prediction intervals.
Usage
First add this crate and any required model crates to your Cargo.toml:
[]
= { = "*", = ["mstl"] }
= "*"
= "*"
use ;
let data = &;
// Set up the model. We're going to use an MSTL model to handle
// multiple seasonalities, with a non-seasonal `AutoETS` model
// for the trend component.
// We could also use any model that implements `augurs_core::Fit`.
let ets = non_seasonal.into_trend_model;
let mstl = new;
// Set up the transformers.
let transformers = vec!;
// Create a forecaster using the transforms.
let mut forecaster = new.with_transformers;
// Fit the forecaster. This will transform the training data by
// running the transforms in order, then fit the MSTL model.
forecaster.fit.expect;
// Generate some in-sample predictions with 95% prediction intervals.
// The forecaster will handle back-transforming them onto our original scale.
let in_sample = forecaster
.predict_in_sample
.expect;
// Similarly for out-of-sample predictions:
let out_of_sample = forecaster
.predict
.expect;