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

Make density calculation in calculateInfoGain use numpy #299

Open
TroyGustke opened this issue Aug 4, 2022 · 0 comments
Open

Make density calculation in calculateInfoGain use numpy #299

TroyGustke opened this issue Aug 4, 2022 · 0 comments

Comments

@TroyGustke
Copy link
Collaborator

TroyGustke commented Aug 4, 2022

Currently, the function uses plt.hist() to obtain density and it creates a histogram plot with it. This function can be easily replaced with np.histogram. I would recommend creating a np array for the bins by linspace of a specified region, then do two np.histogram functions to get the density of the prior and posterior with the same bins.
This section of code is not well commented, and not optimized. I recommend further corrections in the KL calculation as well.
Use the principle of do not break the code. Leave that code there, add yours, check the outputs of both, show A Savara, if I A Savara agrees everything is the same we can then delete the old code and merge.

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