Randomisation-based inference in Python
Project description
Randomisation-based inference in Python based on data resampling and permutation.
Features
Bootstrap samples (ordinary or balanced with optional stratification) from N-D arrays
Apply parametric bootstrap (Gaussian, Poisson, gamma, etc.) on samples
Compute bootstrap confidence intervals (percentile or BCa) for any estimator
Jackknife estimates of bias and variance of any estimator
Permutation-based variants of traditional statistical tests (t-test, K-S test, etc.)
Tools for working with empirical distributions (CDF, quantile, etc.)
Example
# bootstrap uncertainty of arithmetic mean
from resample.bootstrap import variance
import numpy as np
d = [1, 2, 6, 3, 5]
print(f"bootstrap {variance(np.mean, d) ** 0.5:.2f} exact {(np.var(d) / len(d)) ** 0.5:.2f}")
# bootstrap 0.82 exact 0.83
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
resample-1.5.0b0.tar.gz
(250.5 kB
view hashes)
Built Distribution
resample-1.5.0b0-py3-none-any.whl
(18.0 kB
view hashes)
Close
Hashes for resample-1.5.0b0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bf6c120150b5951da97615fdce4efb4c044639c8b8b53a361dd1e065b4bfa0e |
|
MD5 | 2b1f0076c6d0ac13128c35d1fb40304b |
|
BLAKE2b-256 | ce4c59cadd3c323883b7c5adee72bf407a76574dc577b83bf228fbb8ee9d0624 |