plgpm
Pseudo-likelihood Generalized Potts Model for discrete multistate data.
Installation
pip install plgpm
Quick Start
from plgpm import PLGPM
K_list = [12, 12, 12]
model = PLGPM(K_list)
model.fit(S_train)
pll = model.score_pseudologlik(S_test)
samples = model.sample(n_samples=10000, burn=1000, thin=5)
C = model.coupling_matrix()
Streamlined post-fit analysis
from plgpm import PLGPM, mi, plots
model = PLGPM(obj.components).fit(micro_states)
analysis = model.analyze(
data_states=micro_states,
pair=(0, 1), # optional residue pair for joint probabilities
sample_kwargs={"n_samples": 50_000, "burn": 5_000, "thin": 10},
)
# Couplings
plots.plot_coupling_heatmap(analysis.coupling)
# Pair joint probabilities (model vs empirical)
plots.plot_probability_heatmap(analysis.pair["prob_model"], title="Model P(x0, x1)")
plots.plot_probability_heatmap(analysis.pair["prob_data"], title="MD P(x0, x1)")
# Pairwise MI agreement (model vs empirical)
mi.plot_mi_comparison(analysis.mi_data, analysis.mi_model, title_prefix="Dialanine Tripeptide: ")
mi.plot_mi_scatter(analysis.mi_data, analysis.mi_model, title="Dialanine Tripeptide: MRF vs MD pairwise MI")
print(analysis.mi_summary)
What this package does
plgpm fits node-conditional multinomial logistic models for discrete graphical modeling and provides coupling summaries, Gibbs sampling, and evaluation utilities.
Metadata
Release files for plgpm 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| plgpm-0.1.0.tar.gz | 12.8 kB | Without provenance | Details for plgpm-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| plgpm-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for plgpm-0.1.0-py3-none-any.whl |
Total release size: 25.0 kB
Release files / plgpm-0.1.0.tar.gz
| Download URL | plgpm-0.1.0.tar.gz |
|---|---|
| Size | 12.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
be790a80f6a0dae073d6a56d7b7c9a6a9cc975cd5c93a80e878c5830a2f98490
|
|
BLAKE2b-256 checksum How to use checksums |
2f1bed24d96c5736c7f4e89aca327aca92ba5b7abdb7acb5f9a8524fa95832db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.7
|
Release files / plgpm-0.1.0-py3-none-any.whl
| Download URL | plgpm-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b7b1cdb6a3e5a2d5c7fe595cc3dac8fcf2fbf449a5bfb1889f821e2396932338
|
|
BLAKE2b-256 checksum How to use checksums |
3e84b8549810d6673291a937db93df842224077e08818fcdba7ecd00f771e922
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.7
|
Security for plgpm 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.