Skip to main content

Digital Twinning

Digital Twinning

DOI Read the Docs PyPI - Version

A Python package for predictive modeling, probabilistic inference, and Bayesian model updating for digital-twin applications.

Overview

The package combines machine-learning surrogate models, probabilistic models, and MCMC-based parameter estimation. It is intended for workflows where model predictions are trained from simulation or measurement data and then updated using observed quantities of interest.

Inputs and outputs are represented using pandas.DataFrame objects in the predictive-model workflows. Model parameters are described with VariableSet objects from the uncertain_variables package.

Features

Predictive models

The digital_twinning.predictive_models package provides:

  • DNN — feed-forward neural-network regression with configurable hidden layers, activations, dropout, and optional cross-validation.
  • GBT — gradient-boosted regression using XGBoost.
  • LinReg — linear regression baseline.
  • gPCE — generalized Polynomial Chaos Expansion through gPCE_model.
  • MOSAIC — surrogate modeling through the mosaictools package.

Predictive models share a common interface for training and prediction. The base class also provides evaluation, cross-validation, model serialization, and sensitivity-analysis functionality. SHAP computation is implemented by individual model classes where supported.

Probabilistic models

The digital_twinning.probabilistic_models package includes:

  • MDN — a mixture-density network for modeling conditional distributions.
  • CRPS — a probabilistic neural model trained using the Continuous Ranked Probability Score.

These models provide an inference method for generating samples conditioned on input features.

Bayesian model updating

The digital_twinning.model_updating package includes:

  • DigitalTwin — updates one predictive model against measured quantities using MCMC sampling with emcee. It supports posterior samples, posterior summaries, MAP estimation, and plotting.
  • JointManager — performs joint updates for multiple models with shared parameters and provides per-model posterior summaries and samples.

Data and visualization utilities

The digital_twinning.utils package contains helpers for data preparation and visualization, including:

  • Reading and preprocessing modal-shape and weather data.
  • Merging, selecting, and filtering data columns and modes.
  • Converting mode-shape data to and from UNV-related representations.
  • Plotting model results, sensitivity analyses, and MCMC outputs.

Installation

Install the published package with pip:

pip install digital-twinning

The package metadata lists dependencies including PyTorch, scikit-learn, XGBoost, emcee, SALib, shap, gPCE-model, mosaictools, and uncertain-variables. The project is distributed as digital_twinning version 2.0.3.

Source layout

digital_twinning/
├── model_updating/       # DigitalTwin and JointManager
├── predictive_models/    # DNN, GBT, LinReg, gPCE, MOSAIC
├── probabilistic_models/ # MDN and CRPS
└── utils/                # Data processing and plotting helpers

Examples

The repository includes notebooks demonstrating package workflows under demo/notebooks.

These notebooks are the best starting point for seeing how the models are configured and used with the project’s example datasets.

Authors and acknowledgment

Developed by András Urbanics, Áron Friedman, Bence Popovics, Emese Vastag, and Noémi Friedman in the TRACE-Structures group.

This work was funded by the European Commission through the Horizon Europe Innovation Action BUILDCHAIN (grant agreement No. 101092052) up to and including v1.0.0, and by the PRODIGI project from later versions onward.

License

This project is licensed under the GNU General Public License v3.0 only. See the LICENSE file for details.

  • uncertain_variables — probabilistic variable management.
  • gPCE_model — generalized Polynomial Chaos Expansion.
  • mosaictools - a Python toolkit for surrogate modeling of modal properties using the MOSAIC method.

Support

For bug reports and questions, use the project issue tracker.

Metadata

Release files for digital-twinning 2.0.3

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

Source distribution (sdist)

Source distribution for digital-twinning 2.0.3
File Size Uploaded Provenance Actions
digital_twinning-2.0.3.tar.gz 82.6 kB With provenance Details for digital_twinning-2.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for digital-twinning 2.0.3
File Interpreter ABI Platform Actions
digital_twinning-2.0.3-py3-none-any.whl Python 3 none any Details for digital_twinning-2.0.3-py3-none-any.whl

Total release size: 181.3 kB

Release files / digital_twinning-2.0.3.tar.gz

Download URL digital_twinning-2.0.3.tar.gz
Size 82.6 kB
Tags Source
SHA-256 checksum
How to use checksums
7e345ca9cd85be77044c9b853daca58fac680fe68e492fae9366994aa0813a56
BLAKE2b-256 checksum
How to use checksums
cf7cb1d1e0a34a0ef8932672bfd321554194aa2a258714ef24a5664cefb7ce0b
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 9, 2026.

Transparency log

Release files / digital_twinning-2.0.3-py3-none-any.whl

Download URL digital_twinning-2.0.3-py3-none-any.whl
Size 98.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f3d7499894eb9584fd8e68884277710749f3aa90d2626d81d1018c96d7c423f6
BLAKE2b-256 checksum
How to use checksums
96aa5355eeef2478d4e9053f33dd9a2b4dd1d24af01418db1b3c703b60e6d0f2
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 9, 2026.

Transparency log

Security for digital-twinning 2.0.3

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 digital_twinning-2.0.3.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 9, 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.

Release history Release notifications | RSS feed

This release

2.0.3 This release

2 release files Full provenance

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