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

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.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 digital-twinning 2.0.1
File Size Uploaded Provenance Actions
digital_twinning-2.0.1.tar.gz 72.2 kB With provenance Details for digital_twinning-2.0.1.tar.gz

Built distribution (wheel)

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

Total release size: 158.8 kB

Release files / digital_twinning-2.0.1.tar.gz

Download URL digital_twinning-2.0.1.tar.gz
Size 72.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f6f8a39f96aafc47999071180192dd1efb8d57136e8cf4501b2b7bcd8fba92c2
BLAKE2b-256 checksum
How to use checksums
bc0cd52ab4872ee950a670f3e47cb06862ff753be5d2a0a0a1b94c0c9cdbede1
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 Oct 30, 2026.

Transparency log

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

Download URL digital_twinning-2.0.1-py3-none-any.whl
Size 86.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
18e6cac387f3d2fa5436a3fbe1bed561e3b4e595e12c5a5e5bf9b326a5accedb
BLAKE2b-256 checksum
How to use checksums
edfee8f5ef4929835b687f633d9f1d6aa5652269270cd258421000df0ab1cc9d
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 Oct 30, 2026.

Transparency log

Security for digital-twinning 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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for digital_twinning-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 Oct 30, 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.1 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