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

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

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.7
File Size Uploaded Provenance Actions
digital_twinning-2.0.7.tar.gz 98.8 kB With provenance Details for digital_twinning-2.0.7.tar.gz

Built distribution (wheel)

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

Total release size: 215.1 kB

Release files / digital_twinning-2.0.7.tar.gz

Download URL digital_twinning-2.0.7.tar.gz
Size 98.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5f2d6bef22de5f5ae4afeca450fbb59571cba9a35239f61afe660d14bd040588
BLAKE2b-256 checksum
How to use checksums
1926db45010b1128363bad5af7ce2aae46b0a83af7ff3a1711c4be7d8f302da4
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 16, 2026.

Transparency log

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

Download URL digital_twinning-2.0.7-py3-none-any.whl
Size 116.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
527fd337ca1c4792f9fb233a8a90ad22a876fd4f4ec8bc037672f5a3b86bdabd
BLAKE2b-256 checksum
How to use checksums
55e33885561c99066983ddeb82efae5bcecc2b06f9c06f535c80218397521a33
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 16, 2026.

Transparency log

Security for digital-twinning 2.0.7

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.7.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 16, 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.7 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