Add factorial smc#240
Conversation
|
Ah actually cuthbert SMC applies resampling at the start of the |
|
I'm not willing to change that one lol. Monte Carlo outputs should come
weighted rather than resampled to reduce variance.
…On Thu, 21 May 2026, 17:21 SamDuffield, ***@***.***> wrote:
*SamDuffield* left a comment (state-space-models/cuthbert#240)
<#240 (comment)>
Ah actually cuthbert SMC applies resampling at the start of the
filter_combine. This might be problematic, will think about it more
—
Reply to this email directly, view it on GitHub
<#240 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEYGFZ5NGLIGOBAOBAE4TST434UI3AVCNFSM6AAAAACZH5WSRGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DKMJQGI3DSNJWGU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
agreed! Will try find a solution at the factorial level |
|
Fixed by adding a resampling step within |
|
In order to allow a factorial initialisation with shape |
I am trying to find another way to do it right now XD I don't like this change, that argument is difficult to explain for standard smc. We could add a wrapper for |
Oooh thanks!! One option I thought about is changing the factorial initialisation to be |
|
I'm wondering if this code can be made to cover the EnKF without too much trouble either, maybe in a later PR though |
* Some slight modifications to factorialize_init_state * Update cuthbert/factorial/types.py Co-authored-by: Sahel Iqbal <sahel13miqbal@proton.me> --------- Co-authored-by: Sahel Iqbal <sahel13miqbal@proton.me>
|
alright @Sahel13 we good to merge this one? (I'm happy my end) |
|
Just one final thing, when |
|
Oh good point! We should match cuthbert.smc there (can’t remember if an explicit state dimension is required there or not). I’d lean no requiring it though since for SMC we can support ArrayTrees not just Arrays for the particles |
Yeah standard SMC didn't have this limitation, so I have fixed it. I've also modified the |
This reverts commit 4079bc1.
|
Actually I'll make a separate PR for that to keep git history clean. |
Adds SMC factorializer code.
Adaptive resampling doesn't play nice with factorial so we assume resampling is always applied (i.e. no weights carried through). This could probably be documented better.