https://github.com/cgevans/scikits-bootstrap
Python/numpy bootstrap confidence interval estimation.
Science Score: 33.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
✓Academic publication links
Links to: zenodo.org -
✓Committers with academic emails
1 of 10 committers (10.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.6%) to scientific vocabulary
Keywords
Repository
Python/numpy bootstrap confidence interval estimation.
Basic Info
Statistics
- Stars: 178
- Watchers: 16
- Forks: 38
- Open Issues: 5
- Releases: 6
Topics
Metadata Files
README.md
Documentation: Stable, Latest.
scikits-bootstrap
Scikits.bootstrap provides bootstrap statistics confidence interval algorithms for Numpy/Scipy/Pandas. It originally required scipy, but no longer needs it.
It also provides an algorithm which estimates the probability that the statistics lies satisfies some criteria, e.g., lies in some interval.
Much of the code has been written based off the descriptions from Efron and Tibshirani's Introduction to the Bootstrap, and results should match the results obtained from following those explanations. However, the current ABC code is based off of the modified-BSD-licensed R port of the Efron bootstrap code, as I do not believe I currently have a sufficient understanding of the ABC method to write the code independently.
Please contact me (Constantine Evans bootstrap@mb.costi.net, or Matrix <@cge:matrix.org>) with any questions, suggestions, vulnerabilities, or other comments (PGP key), or, preferably, use Github's issue and pull requests.
If you'd like to add something, or make improvements, please keep the following in mind:
I'd like to keep the library as widely supported as possible, with as few dependencies as possible, preferably small ones. I'm also very wary of anything that would break backwards compatibility, even in unknown ways.
I am following semantic versioning.
Code should be formatted with Ruff, and should have type annotations that work in 3.8 through the latest stable Python and PyPy3.
Docstrings should be in Numpy format. They should preferably include references for the implemented algorithms (see the current code for examples).
All code should have working unit tests, preferably ones that do more than just testing fixed output with a fixed random seed, though given the non-deterministic nature of the bootstrap, good, deterministic tests may be difficult. Non-deterministic tests with extremely small chances of failure are acceptable, but shouldn't use such large numbers of samples that they overly slow down the tests.
I am a physicist, and am not very familiar with applications of the bootstrap for business or development statistics. So if you'd like to add something for those, it would be useful to give some more explanation than otherwise as to how they are generally useful.
The package is licensed under the BSD 3-Clause License. It is supported by the Evans Foundation.
I don't see a particular need to cite this package, but if you want to, please use the Zenodo DOI above, or the one appropriate for the version you used.
Version Information
v1.1.1: Compatibility updates for Numpy 2 (thank you @sobue-code, #38), replacement of pyerf with math.erf, changes to build and testing system (using hatch). Python 3.7 is no longer supported.
v1.1.0: Randomness is now generated via a numpy.random Generator. Anything that relied on using numpy.random.seed to obtain deterministic results will fail (mostly of relevance for testing). Seeds (or Generators) can now be passed to relevant functions with the
seedargument, but note that changes in Numpy's random number generation means this will not give the same results that would be obtained usingnumpy.random.seedto set the seed in previous versions.There is a new pval function, and there are several bugfixes.
Numba is now supported in some instances (np.average or np.mean as statfunction, 1-D data), using use_numba=True. Pypy3 is also supported. Typing information has been added, with code passing
mypy --strict --allow-untyped-calls --ignore-missing-imports, and tests cover 100% of the code (though many tests use fixed seeds).Handling of multiple data sets (tuples/etc of arrays) now can be specified as multi="paired" (the previous handling), where the sets must be of the same length, and samples are taken keeping corresponding points connected, or multi="independent", treating data sets as independent and sampling them seperately (in which case they may be different sizes).
v1.0.1: Licensing information added.
v1.0.0: scikits.bootstrap now uses pyerf, which means that it doesn't actually need scipy at all. It should work with PyPy, has some improved error and warning messages, and should be a bit faster in many cases. The old ci_abc function has been removed: use method='abc' instead.
v0.3.3: Bug fixes. Warnings have been cleaned up, and are implemented for BCa when all statistic values are equal (a common confusion in prior versions). Related numpy warnings are now suppressed. Some tests on Python 2 were fixed, and the PyPI website link is now correct.
v0.3.2: This version contains various fixes to allow compatibility with Python 3.3. While I have not used the package extensively with Python 3, all tests now pass, and importing works properly. The compatibility changes slightly modify the output of bootstrap_indexes, from a Python list to a Numpy array that can be iterated over in the same manner. This should only be important in extremely unusual situations.
Installation and Usage
scikits.bootstrap is tested on Python 3.8 - 3.13, and PyPy 3. The package can be installed using pip.
pip install scikits.bootstrap
Usage example for python 3.x:
import scikits.bootstrap as boot
import numpy as np
boot.ci(np.random.rand(100), np.average)
Owner
- Name: Constantine Evans
- Login: cgevans
- Kind: user
- Repositories: 13
- Profile: https://github.com/cgevans
GitHub Events
Total
- Issues event: 1
- Watch event: 5
- Delete event: 1
- Push event: 14
- Pull request event: 2
- Fork event: 2
- Create event: 1
Last Year
- Issues event: 1
- Watch event: 5
- Delete event: 1
- Push event: 14
- Pull request event: 2
- Fork event: 2
- Create event: 1
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Constantine Evans | c****s@e****g | 117 |
| Fernando Paolo | f****o@g****m | 3 |
| mmagnuski | m****i@s****l | 2 |
| Paul Natsuo Kishimoto | m****l@p****e | 2 |
| Mark Teese | t****e | 1 |
| Jan Gleixner | j****r@g****m | 1 |
| Filip Jurcicek | j****k@u****z | 1 |
| Dmitry Balabka | d****a@g****m | 1 |
| Calen Pennington | c****e@e****g | 1 |
| Constantine Evans | c****e@i****l | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 23
- Total pull requests: 13
- Average time to close issues: 11 months
- Average time to close pull requests: about 1 year
- Total issue authors: 20
- Total pull request authors: 9
- Average comments per issue: 2.65
- Average comments per pull request: 1.23
- Merged pull requests: 11
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- dbalabka (3)
- HDembinski (2)
- thomas-haslwanter (1)
- YSanchezAraujo (1)
- borgr (1)
- sobue-code (1)
- jackjackk (1)
- Federico2111 (1)
- rhiever (1)
- mwort (1)
- tnigon (1)
- cpennington (1)
- arnau-foraster (1)
- renderit (1)
- yanirs (1)
Pull Request Authors
- cgevans (6)
- fspaolo (1)
- dbalabka (1)
- lbeltrame (1)
- fossabot (1)
- mmagnuski (1)
- teese (1)
- cpennington (1)
- jurcicek (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- pypi 3,646 last-month
-
Total dependent packages: 7
(may contain duplicates) -
Total dependent repositories: 46
(may contain duplicates) - Total versions: 13
- Total maintainers: 1
pypi.org: scikits.bootstrap
Bootstrap confidence interval estimation routines for Numpy/Scipy/Pandas
- Homepage: http://github.com/cgevans/scikits-bootstrap
- Documentation: https://scikits-bootstrap.readthedocs.io/
- License: BSD License
-
Latest release: 1.1.1
published 7 months ago
Rankings
Maintainers (1)
conda-forge.org: scikits-bootstrap
- Homepage: http://github.com/cgevans/scikits-bootstrap
- License: BSD-3-Clause
-
Latest release: 1.1.0
published about 4 years ago
Rankings
Dependencies
- numpy *
- pyerf *
- typing_extensions >=4.1