Module: tfp.sts

Framework for Bayesian structural time series models.

Classes

class AdditiveStateSpaceModel: A state space model representing a sum of component state space models.

class LinearRegression: Formal representation of a linear regression from provided covariates.

class LocalLinearTrend: Formal representation of a local linear trend model.

class LocalLinearTrendStateSpaceModel: State space model for a local linear trend.

class Seasonal: Formal representation of a seasonal effect model.

class SeasonalStateSpaceModel: State space model for a seasonal effect.

class StructuralTimeSeries: Base class for structural time series models.

class Sum: Sum of structural time series components.

Functions

build_factored_variational_loss(...): Build a loss function for variational inference in STS models.

fit_with_hmc(...): Draw posterior samples using Hamiltonian Monte Carlo (HMC).

forecast(...): Construct predictive distribution over future observations.

one_step_predictive(...): Compute one-step-ahead predictive distributions for all timesteps.

sample_uniform_initial_state(...): Initialize from a uniform [-2, 2] distribution in unconstrained space.