Generic reconstructing the hidden state from the whole observed record. The
closed-form method is used for a cgns_model; a general stochastic_model
is out of scope in this release.
Usage
aci_smoother(model, obs, ...)
# S3 method for class 'cgns_model'
aci_smoother(
model,
obs,
filter = NULL,
conditional = NULL,
init = NULL,
stepper = c("explicit", "implicit"),
nsub = 1L,
regularize = NULL,
force_validate = FALSE,
...
)
# S3 method for class 'stochastic_model'
aci_smoother(model, obs, ...)Arguments
- model
A
cgns_modelorstochastic_modelobject.- obs
An observed trajectory, or anything
as_obs()accepts.- ...
Arguments passed to methods.
- filter
Optional precomputed filter path; recomputed when
NULL.- conditional
Optional
aci_conditional_specselecting a conditional ACI reduction; seeaci_conditional().- init
Optional list with the initial hidden
meanandcov.- stepper
Either
"explicit"or"implicit".- nsub
Positive whole number of sub-steps taken per observation.
- regularize
Covariance policy for this call; see
aci_filter(). One record covers the whole call, so a filter recomputed here and the backward recursion that consumes it share themeta$regularizationon the returned smoother.- force_validate
FALSE(the default) lets afilterthataci_filter()produced for this same model, observations and conditional specification, and that has not been altered since, skip the per-step re-validation of its covariances. Any other supplied path, including one that has been throughsaveRDS(), is validated in full as before.TRUEvalidates unconditionally. The smoother result is the same either way.
Methods (by class)
aci_smoother(cgns_model): Closed-form backward-ODE smoother for a conditional-Gaussian model.aci_smoother(stochastic_model): Classed not-implemented condition for a general (non-CGNS) stochastic model.
Examples
m <- aci_dyad_model()
sim <- simulate(m, seed = 1, t_end = 2, dt = 0.01)
ob <- as_obs(sim)
f <- aci_filter(m, ob)
#> Warning: No init$cov supplied; using a diffuse prior. Discard an initial burn-in window when interpreting results.
aci_smoother(m, ob, filter = f)
#> <da_path_gaussian> kind = smoother, l = 1, N+1 = 201