Created
October 16, 2022 19:00
-
-
Save galenseilis/9ef90b510ba4ed51c3cc55e0ab692ecc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from astropy.stats import jackknife_stats | |
| import numpy as np | |
| from scipy.spatial.distance import pdist | |
| data = np.random.normal(size=10**3) | |
| def test_statistic(x): | |
| x = np.unique(x) | |
| x = x.reshape(-1,1) | |
| return np.min(pdist(x, metric='cityblock')) | |
| estimate, bias, stderr, conf_interval = jackknife_stats(data, test_statistic, 0.95) | |
| print(estimate, bias, stderr, conf_interval) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment