Skip to content

MoveParticle


class MoveParticle(m:Model) < Particle(m)

Particle for use with MoveParticleFilter.

  • m: Model.
classDiagram Particle <|-- MoveParticle Particle <|-- ConditionalParticle link Particle "../Particle/" link MoveParticle "../MoveParticle/" link ConditionalParticle "../ConditionalParticle/"

Factory Functions

Name Description
MoveParticle Create a MoveParticle.

Member Variables

Name Description
zs:Array<Expression<Real>> Log-likelihoods. Each element is a lazy expression giving a single step's contribution to the log-likelihood.
ps:Array<Expression<Real>> Log-priors. Each element is a lazy expression giving a single step's contribution to the log-prior.
π:Real Log-posterior density.

Member Functions

Name Description
size Number of steps.
augment Add a new step.
truncate Remove the oldest step.
grad Compute gradient.
move Move.
compare Compute log-ratio of proposal after move.

Factory Function Details

function MoveParticle(m:Model) -> MoveParticle

Create a MoveParticle.

Member Function Details

augment

function augment(t:Integer, z:Expression<Real>?) -> Real

Add a new step.

  • t: The step number, beginning at 0.
  • z: Expression giving the incremental log-likelihood for th new step.

Returns: Incremental log-likelihood; zero if the argument is nil.

compare

function compare(gen:Integer, x:MoveParticle, κ:Kernel) -> Real

Compute log-ratio of proposal after move.

  • gen: Generation limit.
  • x: Original state x.
  • κ: Markov kernel.

Returns: \log q(x^\prime \mid x).

grad

function grad(gen:Integer)

Compute gradient.

move

function move(gen:Integer, κ:Kernel)

Move.

  • gen: Generation limit.
  • κ: Markov kernel.

size

function size() -> Integer

Number of steps.

truncate

function truncate()

Remove the oldest step.