Skip to main content

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.

The digital twin of Parkinson's disease: from irregular clinic visits to a calibrated forecast that must pass fixed gates

The logo is a red tulip, the symbol of Parkinson's disease. Its solid half is the patient. Its dotted half is the digital twin, drawn as posterior samples.

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())

How it works

symphony-dt method overview: data, model, inference, gates, evaluation and governance

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.1

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.1
File Size Uploaded Provenance Actions
symphony_dt-2.0.1.tar.gz 242.0 kB With provenance Details for symphony_dt-2.0.1.tar.gz

Built distribution (wheel)

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

Total release size: 365.0 kB

Release files / symphony_dt-2.0.1.tar.gz

Download URL symphony_dt-2.0.1.tar.gz
Size 242.0 kB
Tags Source
SHA-256 checksum
How to use checksums
3cbc6ae51cabcee6d0a4f138ced55af542975e91633ab9e786c17d8531a08c0a
BLAKE2b-256 checksum
How to use checksums
056d932c187c5d8d3761be7e125199604cff86dde9711c5ff8c82ba87b8aafae
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.1-py3-none-any.whl

Download URL symphony_dt-2.0.1-py3-none-any.whl
Size 123.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f66ad1bc729c794d8f742774d8a67ab744fc9f184b1eadfa867ffdffcab0d62e
BLAKE2b-256 checksum
How to use checksums
9c86912f00d82b4660b02110375d2fe5b3ea5fcad4a386bab53e0a553121efb2
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.1

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.1.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