Skip to main content

symphony-dt logo

symphony-dt

Bayesian hierarchical state-space digital twins for longitudinal clinical cohorts.

PyPI Python versions CI Coverage Docs Licence

symphony-dt builds, checks, calibrates, forecasts with and audits Bayesian digital twins of longitudinal clinical cohorts. It ships pd_v2, the frozen model of the SYMPHONY v2 study of Parkinson's disease progression. pd_v2 follows MDS-UPDRS Part III, MoCA and SCOPA-AUT over time, in Stan, driven from Python with cmdstanpy.

Developed by Ahmed Hemedan. Validation manuscript in preparation.

Install

pip install "symphony-dt[io]"
python -m cmdstanpy.install_cmdstan --version 2.39.0
symphony-dt check --compile

A ten-line example

import numpy as np
from symphony_dt.data import simulate_cohort
from symphony_dt.fit import fit
from symphony_dt.forecast import split_at_anchor, forecast_exact

cohort = simulate_cohort(60, seed=1)                       # synthetic data only
split = split_at_anchor(cohort.stan_data, list(range(0, 60, 4)), anchor_years=2.0)
result = fit(split.fit, chains=4, iter_warmup=1000, iter_sampling=1000, output_dir="run")
print("\n".join(result.gates().summary_lines()))           # the study's convergence gates
forecast = forecast_exact(result, split, total_keep=400)
print(forecast.interval(0.95).head())

What it does

  • A validated, long-format data model with a design-envelope check. Adapters read wide tables, OMOP CDM, HL7 FHIR R4, CDISC SDTM and the PPMI download layout.
  • The pd_v2 model of record, byte-identical to the study and checked by sha256 at import.
  • Fitting with chain-level resume, and the study's convergence gates fixed in one place.
  • Exact forecasts by the study's design, and an experimental fast route for new participants.
  • The scoring code of record: interval coverage, CRPS, LOCF and mixed-model baselines, events, bootstrap.
  • Simulation-based calibration with explicit multiplicity control, and posterior predictive checks.
  • Run manifests, data fingerprints, pre-registration freezes, PROV provenance, model and data cards.

Every public function carries a validation label: VALIDATED, TESTED or EXPERIMENTAL. See the documentation.

Governance

No participant data ship with this package, and none may be added. Tests, examples and tutorials use the package's own simulator. A privacy gate runs before every commit and in CI. The model was developed on PPMI data under the PPMI data use agreement; obtain PPMI data yourself from PPMI. No PPMI-derived result appears here until the validation manuscript is published. The twin's forecasts are associational: no causal, treatment or deployment claim is made. See GOVERNANCE.md.

Citation

Hemedan A. symphony-dt: Bayesian digital twins of Parkinson's disease progression, version 2.0.0. https://github.com/a7med7emedan/symphony-dt

See CITATION.cff.

Licence

BSD-3-Clause, copyright Ahmed Hemedan. Version 1 remains on the v1 branch and the v1.0-preprint tag under its original Apache-2.0 licence.

Metadata

Release files for symphony-dt 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for symphony-dt 2.0.0
File Size Uploaded Provenance Actions
symphony_dt-2.0.0.tar.gz 241.6 kB With provenance Details for symphony_dt-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for symphony-dt 2.0.0
File Interpreter ABI Platform Actions
symphony_dt-2.0.0-py3-none-any.whl Python 3 none any Details for symphony_dt-2.0.0-py3-none-any.whl

Total release size: 364.3 kB

Release files / symphony_dt-2.0.0.tar.gz

Download URL symphony_dt-2.0.0.tar.gz
Size 241.6 kB
Tags Source
SHA-256 checksum
How to use checksums
696fde10a0f885e5a3ada46b3440c4a6266be168312ec7a85cd0804ce6c4e707
BLAKE2b-256 checksum
How to use checksums
7865f741458accf6dd7b1c9d9aea345798e46716db9c1b8989fd86b849761a8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / symphony_dt-2.0.0-py3-none-any.whl

Download URL symphony_dt-2.0.0-py3-none-any.whl
Size 122.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0e9c800d5e96f32b32a53e496ee8230896ce33c5096465c505e23b2c8b547841
BLAKE2b-256 checksum
How to use checksums
cb3a51044807392572d03881c081d0ca03575b6f5c41c27dcc4fec147f5f5acf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Security for symphony-dt 2.0.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for symphony_dt-2.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page