forecaster.Forecaster
Fit a forecasting model with stochastic variational inference.
Usage
forecaster.Forecaster(
rng_key,
model,
data,
covariates,
*,
guide=None,
optim=None,
num_steps=1001,
num_particles=1,
progress_bar=False,
stable_update=False
)Parameters
rng_key: Array-
PRNG key for inference.
model: ForecastModel-
The forecasting model to fit (OOP instance or functional model).
data: Array-
In-sample data with time at axis
-2. covariates: Array-
Covariates with time at axis
-2and the same duration asdata. guide: GuideLike = None-
Guide specification resolved by
~numpyro_forecast.functional.svi.resolve_guide():None(AutoNormal), anAutoGuideinstance, anAutoGuidesubclass orfunctools.partialfactory of one, or a hand-written guide function. optim: OptimizerLike = None-
Optimizer specification resolved by
~numpyro_forecast.functional.svi.resolve_optimizer():None(Adam(0.01)), a positive scalar learning rate, anoptax.GradientTransformation, or a_NumPyroOptim. num_steps: int = 1001-
Number of SVI steps.
num_particles: int = 1-
Number of ELBO particles.
progress_bar: bool = False-
Whether to display the SVI progress bar.
stable_update: bool = False- Whether SVI skips non-finite parameter updates.