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

StundentT parameter beta parameter update may be wrong #34

Open
PedroPizarro opened this issue Mar 12, 2025 · 1 comment
Open

StundentT parameter beta parameter update may be wrong #34

PedroPizarro opened this issue Mar 12, 2025 · 1 comment

Comments

@PedroPizarro
Copy link

I was using the library and I may stumbled upon some issue.

The file `distribution.py, on line 60-65, has the update equation for the beta hyper-parameter of the predictive posterior. However, I think it might be wrong.

self.betaT = np.concatenate( [ self.beta0, (self.kappaT + (self.kappaT * (x - self.muT) ** 2) / (2 * (self.kappaT + 1))), ]

From your suggested bibliography, hyper-parameter equation for the Beta parameter is the following:

Image

Your code shows a sum with self.kappaT (the first tem fo the second concatenate item) where it should be the self.betaT ifself.
Thus, IMHO the correct formula would be:

self.betaT = np.concatenate( [ self.beta0, (self.betaT + (self.kappaT * (x - self.muT) ** 2) / (2 * (self.kappaT + 1))), ]

@PedroPizarro
Copy link
Author

Adding the more appropriate part of the text:

Image

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

1 participant