Skip to main content

Simplex sampling algorithm

Project description

Simsam: Simplex Sampling Methods

This small package implements methods for sampling from a unit simplex, a problem that often crops up in a data analysis context.

Usage

There is only a single sampling strategy that results in uniform samples from the unit simplex:

from simsam import kraemer_sampling

# Sample 1,000 points from the 10-dimensional unit simplex.
dim = 10
N = 1000
samples = kraemer_sampling(dim, N)

For comparison purposes, there is also a naive sampling procedure, which does not result in uniform samples.

from simsam import naive_sampling

# Sample 1,000 points from the 10-dimensional unit simplex. Notice that
# the samples will be biased.
dim = 10
N = 1000
samples = naive_sampling(dim, N)

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

Simsam-0.1.2.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

Simsam-0.1.2-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file Simsam-0.1.2.tar.gz.

File metadata

  • Download URL: Simsam-0.1.2.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.4 Linux/5.11.16-arch1-1

File hashes

Hashes for Simsam-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ad652bfa8d00a01547ff8bc98f925579801d2df330ecc48f77b5357c75d6c234
MD5 7bdaec791c4161b2a756fee3a356df3e
BLAKE2b-256 64c16aa08b0697005c6baca2da1a89fc373a394b785533f955941e63a9d6c212

See more details on using hashes here.

File details

Details for the file Simsam-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: Simsam-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.4 Linux/5.11.16-arch1-1

File hashes

Hashes for Simsam-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a5ad231e1e061a800b5bcd626c4a9098728874d12ba9132e26d75bfe9495cc06
MD5 9ee2ddab84cc88267e2ff8523730ba42
BLAKE2b-256 da378e0bb96adb74412642e7c901ada144830e93fa1b96b78654def0627b28d6

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