A package for group testing against symmetric distributions.
Project description
symgt
A package for group testing against symmetric distributions. Python 3.
pip install symgt
For example, to compute an optimal partition for a symmetric distribution...
import numpy as np
from symgt import models, algorithms, utils
# the representation alpha of symmetric distribution
alpha = np.array([0.5, 0.2, 0.0, 0.0, 0.0, 0.0, 0.2, 0.1, 0.0, 0.0, 0.0])
m = models.ExchangeableModel(10, alpha)
q = np.exp(m.log_q()) # the representation q of the symmetric distribution
multfn, cost = algorithms.symmetric_multfn(q) # cost is 6
intpart = utils.intpart_from_multfn(multfn) # intpart is [10]
# which differs from that computed using the IID approximation
m_iid = models.IIDModel(10, m.prevalence())
multfn_iid, _ = algorithms.symmetric_multfn(np.exp(m_iid.log_q()))
intpart_iid = utils.intpart_from_multfn(multfn_iid) # is [4, 3, 3]
utils.ECost(q, multfn) # 6
utils.ECost(q, multfn_iid) # 6.63
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
symgt-0.0.6.tar.gz
(1.2 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
symgt-0.0.6-py3-none-any.whl
(9.3 kB
view details)
File details
Details for the file symgt-0.0.6.tar.gz.
File metadata
- Download URL: symgt-0.0.6.tar.gz
- Upload date:
- Size: 1.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84f89c1e5808ffa389aab74222b613be4299b5ef6c2cc45cca4a43fc8343be2d
|
|
| MD5 |
63a3ec952b63b4bbaba5f69e7b10f488
|
|
| BLAKE2b-256 |
e447e3beba99c686e8f9d26d880be3e77b2b65acdb3f294efa70f37a3a0e17cd
|
File details
Details for the file symgt-0.0.6-py3-none-any.whl.
File metadata
- Download URL: symgt-0.0.6-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f22b70978b61de21007c896609c6166a4ccd3593623a251993d372c509bb05e
|
|
| MD5 |
3cb5bec0c11a787167edb86e49738fb0
|
|
| BLAKE2b-256 |
b4eb1576ab5d83382238a04c46986d10f9b7c4c096519a1ffb0a66427172be7b
|