sts_one_step_predictive {tfprobability} | R Documentation |
Compute one-step-ahead predictive distributions for all timesteps
Description
Given samples from the posterior over parameters, return the predictive
distribution over observations at each time T
, given observations up
through time T-1
.
Usage
sts_one_step_predictive(
observed_time_series,
model,
parameter_samples,
timesteps_are_event_shape = TRUE
)
Arguments
observed_time_series |
|
model |
An instance of |
parameter_samples |
|
timesteps_are_event_shape |
Deprecated, for backwards compatibility only. If False, the predictive distribution will return per-timestep probabilities Default value: TRUE. |
Value
forecast_dist a tfd_mixture_same_family
instance with event shape
list(num_timesteps)
and batch shape tf$concat(list(sample_shape, model$batch_shape))
, with
num_posterior_draws
mixture components. The t
th step represents the
forecast distribution p(observed_time_series[t] | observed_time_series[0:t-1], parameter_samples)
.
See Also
Other sts-functions:
sts_build_factored_surrogate_posterior()
,
sts_build_factored_variational_loss()
,
sts_decompose_by_component()
,
sts_decompose_forecast_by_component()
,
sts_fit_with_hmc()
,
sts_forecast()
,
sts_sample_uniform_initial_state()