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

add option to sample to get initial point #108

Merged
merged 3 commits into from
Sep 5, 2023

Conversation

schminin
Copy link
Contributor

@schminin schminin commented Sep 4, 2023

When working with complex state distributions (mixed discrete/continuous) I ran into a problem trying to simulate from the AdvancedParticleFilter, because the initial point is per default the mean of the distribution.
Generally, the mean of a distribution (even a continuous one) is never guaranteed to be in the support of the distribution. Hence, providing the user the choice to sample instead of taking the mean of the distribution to get an initial distribution for the particle filter would be beneficial. Especially since this barely changes the code.

@baggepinnen
Copy link
Owner

Thanks, makes sense to have it as an option. Could we call it sample_initial instead? And also note that you don't need to introduce the if/else branchm, just pass noise=sample_initial

@schminin
Copy link
Contributor Author

schminin commented Sep 4, 2023

Sure, thank you for the fast feedback :)

src/filtering.jl Outdated Show resolved Hide resolved
src/filtering.jl Outdated Show resolved Hide resolved
@baggepinnen baggepinnen merged commit 9605d12 into baggepinnen:master Sep 5, 2023
1 check passed
@baggepinnen
Copy link
Owner

Thanks for your PR, a new version that includes this change is now out :)

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

Successfully merging this pull request may close these issues.

None yet

2 participants