R/sts.R
sts_linear_regression.Rd
This model defines a time series given by a linear combination of covariate time series provided in a design matrix:
observed_time_series <- tf$matmul(design_matrix, weights)
sts_linear_regression(design_matrix, weights_prior = NULL, name = NULL)
design_matrix | float |
---|---|
weights_prior |
|
name | the name of this model component. Default value: 'LinearRegression'. |
an instance of StructuralTimeSeries
.
The design matrix has shape list(num_timesteps, num_features)
.
The weights are treated as an unknown random variable of size list(num_features)
(both components also support batch shape), and are integrated over using the same
approximate inference tools as other model parameters, i.e., generally HMC or
variational inference.
This component does not itself include observation noise; it defines a
deterministic distribution with mass at the point
tf$matmul(design_matrix, weights)
. In practice, it should be combined with
observation noise from another component such as sts_sum
, as demonstrated below.
For usage examples see sts_fit_with_hmc()
, sts_forecast()
, sts_decompose_by_component()
.
Other sts:
sts_additive_state_space_model()
,
sts_autoregressive_state_space_model()
,
sts_autoregressive()
,
sts_constrained_seasonal_state_space_model()
,
sts_dynamic_linear_regression_state_space_model()
,
sts_dynamic_linear_regression()
,
sts_local_level_state_space_model()
,
sts_local_level()
,
sts_local_linear_trend_state_space_model()
,
sts_local_linear_trend()
,
sts_seasonal_state_space_model()
,
sts_seasonal()
,
sts_semi_local_linear_trend_state_space_model()
,
sts_semi_local_linear_trend()
,
sts_smooth_seasonal_state_space_model()
,
sts_smooth_seasonal()
,
sts_sparse_linear_regression()
,
sts_sum()