Metadata-Version: 2.1
Name: simsam
Version: 0.1.3
Summary: Simplex sampling algorithm
Home-page: https://github.com/Pseudomanifold/Simsam
License: BSD-3-Clause
Author: Bastian Rieck
Author-email: bastian@rieck.me
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: numpy (>=1.19.4,<2.0.0)
Project-URL: Repository, https://github.com/Pseudomanifold/Simsam
Description-Content-Type: text/markdown

# `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:

```python
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.

```python
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)
```

