Skip to main content

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

package_sampling-0.3.0.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

package_sampling-0.3.0-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file package_sampling-0.3.0.tar.gz.

File metadata

  • Download URL: package_sampling-0.3.0.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for package_sampling-0.3.0.tar.gz
Algorithm Hash digest
SHA256 cdc13cac1615d88acde5731fa0a99807ced2f232566f37dbb47ef45236ecc7ad
MD5 445e33190b817b516ee49b9f683ba878
BLAKE2b-256 c30d70d71899f346b13204c72cf2d79797fed63ef29a44726919286f7dce3f99

See more details on using hashes here.

File details

Details for the file package_sampling-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for package_sampling-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a607717883c03bcef4f456f9c8f26fa95d435158bed71a9b21e755687af91762
MD5 95adb2e9f4d3075d1f1450ef4bcd772f
BLAKE2b-256 beea3760c056db2f16f81e2ae3ce1fcc75f208066a40e39377db0a05c48293d2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page