Qu

move

Builtin index · Statistics & ML

result = state.move(dt)

Input: dt · Output: result

What it is

Exactly predict(dt) on a kind="particle_tracker" state — the row above — under a verb that says what the step is: for this filter the predict step really is a concrete constant-velocity motion update, not the estimation family's generic predict(transition, Q). dt is a number, the timestep. Calling it on any other kind of state errors rather than silently falling back to predict.

Overloads

One call shape — this function is not overloaded.

CodeInputOutputDescription
result = state.move(dt)
dt numbernot documented yet
result Record
Returns a new kind="particle_tracker" state Record; the original state is left untouched.

Examples

From the documentation, and run by the build -- the output and the figure below are what the engine actually produced. Simplest first.

pf = particle_filter(50000, [0, 0], process_noise=0.08, obs_noise=0.4, spread=2.0, seed=3)
for k = 0 to N - 1
    pf = pf.move(dt)
    pf = pf.update([measured[k]])
end for

from tour

How it works

move(state, dt) — an alias for predict(state, dt) that only makes sense (and is only accepted) for a "particle_tracker" state: state.move(dt) reads more naturally than state.predict(dt) for a filter whose predict step IS a concrete "advance every particle's position by one physical step" motion update, unlike the generic estimation family's predict(state, transition, Q) contract.

From the note above this builtin in the interpreter, where the reasoning was written down as it was built.