Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate resampling from prediction step #9

Open
THargreaves opened this issue Oct 17, 2024 · 0 comments
Open

Separate resampling from prediction step #9

THargreaves opened this issue Oct 17, 2024 · 0 comments

Comments

@THargreaves
Copy link
Collaborator

Low priority but just popping here as a reminder.

#7 makes good steps towards defining a consistent interface for filtering (step/predict/update)

Currently, resampling is included within the prediction step but that feels philosophically questionable to me. Instead, I think augmenting the step method for a new AbstractParticleFilter <: AbstractFilter could work nicely.

Something like this

function step(
    rng::AbstractRNG,
    model::AbstractStateSpaceModel,
    alg::AbstractParticleFilter,
    iter::Integer,
    state,
    observation;
    kwargs...,
)
    resampled_state = resample(model, alg, iter, state; kwargs...)
    proposed_state = predict(rng, model, alg, iter, state; kwargs...)
    filtered_state, ll = update(model, alg, iter, proposed_state, observation; kwargs...)

    return filtered_state, ll
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant