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.2.0.tar.gz (12.2 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.2.0-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

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

Hashes for package_sampling-0.2.0.tar.gz
Algorithm Hash digest
SHA256 607abacff9a199df27228e489a3db737e63eac38a9fbf52bb78a423183720e37
MD5 4c7d24477c7eaccb7046b35c08011ea9
BLAKE2b-256 90487b65ccad7d9afbdf24c7646167fad62c339e0b8ddc6c4e6159885ff117d4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for package_sampling-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ea82800ca6ee20caf1f93785d69fab7bacdb075eebe82fbf2c35c26fa9fd964f
MD5 02f47181bef235bcf02720474f5a1aaa
BLAKE2b-256 64568f7e9758bacb6c39a12c93d06311f700697dff9163fb378fa72de15b1aa2

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