You do not have permission to delete messages in this group
Link
Report message as abuse
Sign in to report message as abuse
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to TensorFlow Probability
Hi,
I would like to perform online Kaman/particle filter instead of scanned version provided by tfp api like `tfp.experimental.mcmc.particle_filter` or `tfd.LinearGaussianStateSpaceModel.forward_filter`.
To be clear, TFP is designed for filtering a vector of observations, while I am receiving observations in the streaming fashion and I want to make a decision based on the current estimate of the hidden state.
What is the recommended way to do it in TFP, as the internals of the mentioned methods are not part of the public API.
One possibility I see is to run the scanned function for each observation and update the state prior for the next iteration. Is this the correct approach?
Regards
Krzysztof Rusek
Junpeng Lao
unread,
Sep 29, 2022, 1:21:25 AM9/29/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Link
Report message as abuse
Sign in to report message as abuse
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to TensorFlow Probability, kru...@gmail.com
One way you can try is to use the build_kalman_filter_step in tfd.LinearGaussianStateSpaceModel.forward_filter to build the one step function at time t:
Assuming you have transition/observation matrix/noise at each step, you can do something like:
Otherwise, you can copy and modify the internal of kalman_filter_step and turn it into a tensor in tensor out function
For particle filter it is easier as you can use sequential_monte_carlo_kernel.SequentialMonteCarlo, it is how particle filter one step is called.
How this helps.
Krzysztof Rusek
unread,
Sep 29, 2022, 6:28:53 AM9/29/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Link
Report message as abuse
Sign in to report message as abuse
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Junpeng Lao, TensorFlow Probability
Thank you, this helps a lot, however, ideally ` _particle_filter_propose_and_update_log_weights_fn` should be part of public API to fully embrace SequentialMonteCarlo without custom boilerplate.
> Wiadomość napisana przez Junpeng Lao <junpe...@gmail.com> w dniu 29.09.2022, o godz. 07:21: