Python implementation of various probability-based sampling algorithms inspired by the R package Sampling.
Project description
Package Sampling
python version of Package Sampling in R
Installation
You can install the package directly from PyPI:
pip install package-sampling
Usage Example
from package_sampling.sampling import up_brewer
import numpy as np
probabilities = np.array([0.1, 0.2, 0.3, 0.4])
# Draw a sample using Brewer's method
sample = up_brewer(probabilities)
print(sample)
Authors
Mohammadreza Razavian - smrrazavian@outlook.com Bardia Panahbehagh - Panahbehagh@khu.ac.ir
Acknowledgments
This package is inspired by the R package "Sampling" Thanks to all contributors and users
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file package_sampling-0.2.0.tar.gz.
File metadata
- Download URL: package_sampling-0.2.0.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
607abacff9a199df27228e489a3db737e63eac38a9fbf52bb78a423183720e37
|
|
| MD5 |
4c7d24477c7eaccb7046b35c08011ea9
|
|
| BLAKE2b-256 |
90487b65ccad7d9afbdf24c7646167fad62c339e0b8ddc6c4e6159885ff117d4
|
File details
Details for the file package_sampling-0.2.0-py3-none-any.whl.
File metadata
- Download URL: package_sampling-0.2.0-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea82800ca6ee20caf1f93785d69fab7bacdb075eebe82fbf2c35c26fa9fd964f
|
|
| MD5 |
02f47181bef235bcf02720474f5a1aaa
|
|
| BLAKE2b-256 |
64568f7e9758bacb6c39a12c93d06311f700697dff9163fb378fa72de15b1aa2
|