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.18.tar.gz
(23.2 kB
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.18-py3-none-any.whl
(12.7 kB
view details)
File details
Details for the file symgt-0.0.18.tar.gz.
File metadata
- Download URL: symgt-0.0.18.tar.gz
- Upload date:
- Size: 23.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33e643f51a99f027d946847cca308dc41f48b94a0d4bfa179950c62418a53f75
|
|
| MD5 |
c035b8064ef373888b2d9d301abe7084
|
|
| BLAKE2b-256 |
1109a635ae4137b7034f10bab4a0819a0ae059b78f79d866e4c21b7c0b1fdb90
|
File details
Details for the file symgt-0.0.18-py3-none-any.whl.
File metadata
- Download URL: symgt-0.0.18-py3-none-any.whl
- Upload date:
- Size: 12.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d3777d6c6c3e7e84ab54d64446d5986f385e6461ba7c1c2bd4c741c3cb0a147
|
|
| MD5 |
276311ca0a78b2d64a0d6cd7401ee447
|
|
| BLAKE2b-256 |
f7903c39c1f99e924af1c7c8ece815a00632b4e46e8ee64b0f7b5db4c31c2e6e
|