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

95% CI #2

Open
aminnj opened this issue Oct 31, 2021 · 1 comment
Open

95% CI #2

aminnj opened this issue Oct 31, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@aminnj
Copy link
Owner

aminnj commented Oct 31, 2021

add a parameter to scale the error band

@aminnj aminnj added the enhancement New feature or request label Jan 15, 2022
@aminnj
Copy link
Owner Author

aminnj commented Oct 15, 2022

Requires generalizing

sampled_stds = np.nanstd(sampled_ydata, axis=0)

to something like

import numpy as np

sampled_ydata = np.random.normal(0, 1, size=(500, 10))

sampled_ydata[250, 5] = np.nan

nstd = np.nanstd(sampled_ydata, axis=0)
alpha = 0.683  # or 0.95
qstd = np.nanquantile(
    np.abs(sampled_ydata - np.nanmean(sampled_ydata, axis=0)), alpha, axis=0
)
print(nstd)
print(qstd)
# [0.96247188 1.03510003 0.99427915 1.00405951 1.02487994 0.98889515 1.04271745 1.0513755  0.98316079 1.06303003]
# [0.94159716 1.0257386  0.98379726 1.00578981 0.99083196 0.9758496  1.03973236 1.08269368 0.97805165 1.06553879]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant