The number of particles at first-time point for particle filter

6 views
Skip to first unread message

kei

unread,
Jun 6, 2024, 9:31:26 PMJun 6
to nimble-users
Hi all nimble users!

I have a question about Particle filter with nimble.
I want to increase particles at only first time point to search more carefully.
However, it takes much calculation cost to use increased particles for all time points. 

So I want to increase at only first time point.
For example, I want to use 10^6 particles in the first time point and use 10^4 particles after 2nd time points.

Is it possible in the latest nimbleSMC version?

It is very rough question, so please ask me if there is any questions or suggestions.

Thanks,
kei

Chris Paciorek

unread,
Jun 7, 2024, 8:21:24 PMJun 7
to kei, nimble-users
Hi Kei,

This is not possible in our released nimbleSMC and I don't think it's a general enough feature that we would add it to the package.

However, it may be possible for you to modify the functionality in the nimbleSMC source code without a lot of effort. The `run()` method for the filter of interest (e.g., bootstrap, auxiliary, etc.) should be straightforward to read in the relevant code file of the nimbleSMC source package (you could download it from CRAN or from github.com/nimble-dev/nimbleSMC).

You could then edit the `run` method to take two arguments, "m1" and "mLater" and modify the code of the method to `resize` the storage (modelValues) objects that hold the values for each particle and pass the desired "m" into the iteration-specific "stepFunctions" that run the filter. Then rebuild and re-install the nimbleSMC package.

If you take a try at it and run into questions, feel free to follow up here. We're happy to try to help users use nimble in flexible/creative ways.

-chris

--
You received this message because you are subscribed to the Google Groups "nimble-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nimble-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nimble-users/fc55f3bb-b2cf-4db3-ad6a-58ecf2f0d3efn%40googlegroups.com.

kei

unread,
Jun 9, 2024, 10:30:24 PMJun 9
to nimble-users
Hi Chris and all nimble users

Thank you for your kind reply!
I may understand how to modify the source code.

Actually, I want to use PMCMC using bootstrapfilter with such modification(increase particles only first time point).
Are these run method editions also reflected when PMCMC is performed?

Thanks,
Kei
2024年6月8日土曜日 9:21:24 UTC+9 Chris Paciorek:

Perry de Valpine

unread,
Jun 11, 2024, 1:11:04 PMJun 11
to kei, nimble-users
The PMCMC should be able to use any PF you give it, including a PF that you have modified.

Reply all
Reply to author
Forward
0 new messages