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

Question about alpha calculation in forward pass #168

Open
ncguilbeault opened this issue Jun 10, 2024 · 1 comment
Open

Question about alpha calculation in forward pass #168

ncguilbeault opened this issue Jun 10, 2024 · 1 comment

Comments

@ncguilbeault
Copy link

Hi,

Thank you for developing this fantastic tool!

I have a question regarding the use of your package for performing online inference. Specifically, I am trying to implement the equation ๐›ผhat = ๐‘ƒ(๐‘ง๐‘› โˆฃ ๐‘ฅ1, โ€ฆ , ๐‘ฅ๐‘›) as described in Bishop (2006).

Does your package or API include a function that calculates this directly? From my review of the source code, the closest functionality I found is in the forward_pass function where the alphas are computed (this line in messages.py). Is this ๐›ผ the same as ๐›ผhat?

Any insights or guidance you can provide would be greatly appreciated.

Best regards,
Nick

@joacorapela
Copy link

Hello Nick,

$\hat{\alpha}_n=P(z_n|x_1,\ldots,x_n)$, in Eq. 13.55 of Bishop, 2006, is computed inside function hmm_filter in variable pz_tt, but it is not returned by this fuction. It only returns $P(z_{n+1}|x_1,\ldots,x_n)$. It would be better if hmm_filter, and function filter which calls it, returned both of these quantities.

@slinderman would a pull request changing the return values of these functions be welcomed?

Joaquin

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

2 participants