OptionalalgorithmAlgorithm selection. 'scan' = sequential, 'assoc' = parallel associative scan. Default: auto-select from device/dtype.
OptionalarAR coefficients (initial values). In MATLAB DLM, this is arphi.
OptionaldtypeComputation precision. Default: 'f64'.
OptionalFObservation matrix F [p, m]. When provided, p is inferred from F.length (first dimension) and y must be 2D [n, p]. When omitted, F is derived from dlmGenSys (p=1, univariate).
OptionalfullFull seasonal component (ns-1 dummy variables). In MATLAB DLM, this is fullseas.
OptionalharmonicsNumber of trigonometric harmonic pairs. In MATLAB DLM, this is trig.
Observation noise std dev(s).
Univariate (p=1):
number: same std for all timesteps.ArrayLike<number> of length n: per-timestep observation noise.Multivariate (p>1): inferred when F is provided.
number: same std for all series and timesteps → V² = s²·Iₚ.number[] of length p: per-series → V²(t) = diag(s₀², …, sₚ₋₁²).number[][] of shape [n, p]: per-timestep per-series.OptionalorderPolynomial trend order: 0 (level), 1 (level + slope), 2 (level + slope + acceleration). Default: 1.
Process noise std devs (diagonal of √W). Length determines which states have noise.
OptionalseasonSeasons per cycle (period length). In MATLAB DLM, this is ns. Default: 12.
OptionalsplineSpline mode for order=1: modifies W for integrated random walk.
OptionalstabilizationStabilization mode for the backward smoother.
'matlab' — MATLAB dlmsmo.m exact match (cTriuSym + cSmoAbsDiag).'none' — Disable all optional stabilization flags.undefined (omit) — Library defaults per dtype.See DlmStabilization and DlmStabilizationFlags.
OptionaltimestampsObservation timestamps (length n). When provided, G and W become time-varying: G(Δt_k) and W(Δt_k) are computed via closed-form continuous-time discretization for each step Δt_k = t[k] - t[k-1].
Supported model components: polynomial trend (order 0, 1, 2) and trigonometric harmonics. Throws if fullSeasonal or AR components are used (these are purely discrete-time constructs).
When omitted, all timesteps use Δt = 1 (uniform spacing, equivalent to the standard DLM convention).
Tip — interpolation at query points: To obtain smoothed estimates
at times where no observation exists (e.g., regular grid over an
irregular series), insert NaN observations at those timestamps.
The smoother treats NaN as missing data (pure prediction step with
widening covariance), giving you interpolated state estimates and
uncertainty bands at arbitrary query points — no separate forecast
call needed.
OptionalXCovariate matrix: n rows × q columns. X[t] is the covariate row at time t.
Options for dlmFit and dlmFitTensor.