ParticleFilterResult#

class cultivars.state_space.nonlinear.ParticleFilterResult(*, loglikelihood, loglikelihood_contributions, filtered_state, filtered_state_std, effective_sample_size, n_particles, method)[source]#

Output of a sequential-Monte-Carlo forward pass.

The state distribution is carried as moments of the particle cloud rather than as the cloud itself, which at (T, n_particles, m) would dwarf everything else a session holds; a caller who needs the full cloud runs the filter step by step.

Variables:
  • filtered_state – Particle-cloud means \(\mathbb{E}[\alpha_t \mid y_{1:t}]\), shape (n, m).

  • filtered_state_std (NDArray[double]) – Per-component cloud standard deviations, shape (n, m).

  • effective_sample_size (NDArray[double]) – The weight-degeneracy diagnostic per period, in (0, n_particles]; values collapsing toward one mean the likelihood estimate is untrustworthy at that period.

  • n_particles (int) – Particles carried.

  • method (str) – "bootstrap" or "auxiliary".

See also

Attributes#

filtered_state

Particle-cloud means \(\mathbb{E}[\alpha_t \mid y_{1:t}]\), shape (n, m).

filtered_state_std

Per-component cloud standard deviations, shape (n, m).

effective_sample_size

The weight-degeneracy diagnostic per period, in (0, n_particles]; values collapsing toward one mean the likelihood estimate is untrustworthy at that period.

n_particles

Particles carried.

method

"bootstrap" or "auxiliary".

loglikelihood

Total log-likelihood of the data under the model.

loglikelihood_contributions

Per-period contributions, shape (n,).