https://github.com/marberts/pysps
Sequential Poisson sampling in Python
https://github.com/marberts/pysps
python sampling statistics
Last synced: over 1 year ago
JSON representation
Sequential Poisson sampling in Python
- Host: GitHub
- URL: https://github.com/marberts/pysps
- Owner: marberts
- License: mit
- Created: 2024-02-02T03:10:28.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-23T04:00:08.000Z (over 1 year ago)
- Last Synced: 2025-01-23T05:20:04.891Z (over 1 year ago)
- Topics: python, sampling, statistics
- Language: Python
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# A Python module for sequential Poisson sampling
A quick Python implementation of some functions from the `sps` R package.
Requires Python >= 3.10 and numpy.
```python
>>> import pysps
>>> pi = pysps.InclusionProb([1, 2, 3, 4], 3)
>>> samp = pysps.OrderSample(pi)
>>> samp.units
array([1, 2, 3])
>>> samp.weights
array([1.5, 1.0, 1.0])
```