sts_linear_regression {tfprobability} | R Documentation |
Formal representation of a linear regression from provided covariates.
Description
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)
Usage
sts_linear_regression(design_matrix, weights_prior = NULL, name = NULL)
Arguments
design_matrix |
float |
weights_prior |
|
name |
the name of this model component. Default value: 'LinearRegression'. |
Details
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.
Value
an instance of StructuralTimeSeries
.
See Also
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()