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

Questions about the calculation of likelihood ratio #66

Open
lovelyshyperson opened this issue Apr 20, 2023 · 0 comments
Open

Questions about the calculation of likelihood ratio #66

lovelyshyperson opened this issue Apr 20, 2023 · 0 comments

Comments

@lovelyshyperson
Copy link

Hello,
Thank you for your contributions, which is a great help for me to understanding the BART model. But I found something questionable about the calculation of the likelihood ratio when sampling to modify the tree structure. Please take a look at the function log_grow_ratio in the file bartpy/samplers/unconstrainedtree/likelihoodratio.py, line 20

first_term = (var * (var + n * sigma_mu)) / ((var + n_l * var_mu) * (var + n_r * var_mu))

I think there are something wrong with n * sigma_mu. It should be corrected as
first_term = (var * (var + n * var_mu)) / ((var + n_l * var_mu) * (var + n_r * var_mu))

Same question is also found in the log_grow_function in the file bartpy/samplers/oblivioustrees/likelihoodratio.py

My thoughts are based on the paper bartMachine: Machine Learning with Bayesian Additive Regression Tree, A.1. part. You will be greatly appreciated to point that out if I am wrong. Hope my thoughts be helpful to you.

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