dlm-js
    Preparing search index...

    Function dlmMLE

    • Estimate DLM parameters (obsStd, processStd, and optionally arCoefficients) by maximum likelihood via autodiff.

      The entire optimization step — valueAndGrad(loss) (Kalman filter forward pass + AD backward pass) and optax Adam moment/parameter updates — is wrapped in a single jit() call, so every iteration runs from compiled code.

      The parameterization maps unconstrained reals → positive values: obsStd = exp(θ_s), processStd[i] = exp(θ_{w,i}) AR coefficients (when fitAr = true) are optimized directly (unconstrained — not log-transformed, matching MATLAB DLM behavior).

      When obsStdFixed is supplied (a per-timestep σ array, e.g. known measurement uncertainties), the observation noise is not estimated — it is treated as a known constant. Only processStd (and optionally arCoefficients) are optimized. The returned obsStd field will be NaN in this case.

      Parameters

      • y: ArrayLike<number>

        Observations (n×1)

      • Optionalopts: DlmMleOptions

        MLE options: model specification, optimizer settings, runtime config

      Returns Promise<DlmMleResult>

      MLE result with estimated parameters and full DLM fit