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

percentile error in notebooks/utils/bootstrap.py #2

Open
anazalea opened this issue Sep 10, 2017 · 0 comments
Open

percentile error in notebooks/utils/bootstrap.py #2

anazalea opened this issue Sep 10, 2017 · 0 comments

Comments

@anazalea
Copy link

In the function confidence_band() in notebooks/utils/bootstrap.py, you use

lower = np.percentile(boots, 0.16, axis=0)
median = np.percentile(boots, 0.50, axis=0)
upper = np.percentile(boots, 0.84, axis=0)

numpy.percentile(a,q) returns the value of a q/100 of the way through the sorted elements of a, so I think what you need here is

lower = np.percentile(boots, 16, axis=0)
median = np.percentile(boots, 50, axis=0)
upper = np.percentile(boots, 84, axis=0)

P.S. Thanks so much for making everything available. This transparency in analysis is what astronomy needs.

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