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.3.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.3-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: Simsam-0.1.3.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.6 Darwin/19.6.0

File hashes

Hashes for Simsam-0.1.3.tar.gz
Algorithm Hash digest
SHA256 27945d537a0e64b8aa4a76f0adc2dd00daa964331c9df541d8a6aa130bd91f69
MD5 e0444550be8d73ef5c1cdbcc8812c4e1
BLAKE2b-256 0605faf134f7d7769eee7c872a1cdb8a20b56733e6417d2902d537ae03e0200c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: Simsam-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.6 Darwin/19.6.0

File hashes

Hashes for Simsam-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e95814a5fc3987075aac67b404b7fbfeb4131c758056c0e76ea0b68317339675
MD5 a2ae238c85d0951dbb0039f46a4f5637
BLAKE2b-256 9e58e2fb4dce347d813349a92854ba353a7908859158b08498ddc2a41dbb1bfb

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