A comprehensive package for digital twin model updating and predictive modeling using machine learning and uncertainty quantification techniques
Project description
digital_twinning
A comprehensive Python package for digital twin model updating and predictive modeling using machine learning and uncertainty quantification techniques.
Overview
The Digital Twinning package provides tools for creating data-driven predictive models and updating them with measurement data using Bayesian inference (MCMC). It combines surrogate modeling, machine learning, and probabilistic model updating for structural health monitoring and digital twin applications.
Installation
pip install digital-twinning
Features
Predictive Models
- Deep Neural Networks (DNN): Flexible neural network architectures with customizable layers and activation functions
- Gradient Boosted Trees (GBT): Support for multiple implementations (XGBoost, CatBoost, LightGBM, scikit-learn)
- Linear Regression: Basic linear regression models for baseline comparisons
- gPCE Models: Generalized Polynomial Chaos Expansion for uncertainty quantification
Model Updating
- Bayesian Model Updating: MCMC-based parameter estimation using emcee
- Multi-Building Updates: Joint parameter estimation across multiple structures
- Prior and Posterior Analysis: Tools for analyzing parameter distributions
Model Interpretability
- SHAP Analysis: Feature importance and explanation using SHAP values
- Sobol Sensitivity Analysis: Global sensitivity analysis for parameter importance
- Visualization Tools: Comprehensive plotting utilities for model analysis
Key Classes
PredictiveModel
The base class for all predictive models. Supports training, prediction, cross-validation, and model interpretability.
Methods:
train(): Train the model with optional k-fold cross-validationpredict(): Make predictions on new dataget_shap_values(): Compute SHAP values for feature importanceget_sobol_sensitivity(): Perform Sobol sensitivity analysissave_model()/load_model(): Serialize and deserialize models
DigitalTwin
MCMC-based Bayesian model updating for parameter estimation.
Methods:
update(): Update parameters using measurement dataget_mean_and_var_of_posterior(): Get posterior statisticsget_MAP(): Get maximum a posteriori estimateloglikelihood(): Compute log-likelihood of measurementslogprior(): Compute log-prior of parameters
JointManager
Manage joint model updating for multiple buildings with shared parameters.
Methods:
update(): Perform joint update across all buildingsget_joint_paramset_and_indices(): Create joint parameter spacegenerate_joint_stdrn_simparamset(): Generate joint simulation parameter sets
DNNModel
Deep Neural Network implementation with PyTorch backend.
Features:
- Flexible architecture with customizable layers
- Multiple activation functions (ReLU, GELU, Tanh, etc.)
- Dropout regularization
- Early stopping
- GPU support
GBTModel
Gradient Boosted Decision Trees with multiple backend options.
Supported Backends:
- XGBoost
- CatBoost
- LightGBM
- scikit-learn GradientBoostingRegressor
Authors and acknowledgment
The code is developed by András Urbanics, Áron Friedman, Bence Popovics, Emese Vastag, Elmar Zander and Noémi Friedman in the TRACE-Structures group.
This work has been funded by the European Commission Horizon Europe Innovation Action project 101092052 BUILDCHAIN
License
This project is licensed under the GNU General Public License v3.0 (GPL-3.0-only). See the LICENSE file for details.
Related Projects
- gPCE_model: Generalized Polynomial Chaos Expansion
- uncertain_variables: Probabilistic variable management
Support
For issues, questions, or contributions, please refer to the project repository or contact the authors.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file digital_twinning-0.1.7.tar.gz.
File metadata
- Download URL: digital_twinning-0.1.7.tar.gz
- Upload date:
- Size: 66.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
464f58a3b0f46acc4e18c32fcef33db3ff28d7d2b3994e8738262b1258fb0ff2
|
|
| MD5 |
36873fd8cf6881c84cfc898273bc5a62
|
|
| BLAKE2b-256 |
5f6b1c01c641a49f38a21a2297d67e1534319d355f631238fb2370078788afa4
|
Provenance
The following attestation bundles were made for digital_twinning-0.1.7.tar.gz:
Publisher:
python-publish.yml on TRACE-Structures/digital_twinning
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
digital_twinning-0.1.7.tar.gz -
Subject digest:
464f58a3b0f46acc4e18c32fcef33db3ff28d7d2b3994e8738262b1258fb0ff2 - Sigstore transparency entry: 772836111
- Sigstore integration time:
-
Permalink:
TRACE-Structures/digital_twinning@b39476c47abe7ec72d7e8f25f5d826e18d46a2d1 -
Branch / Tag:
refs/tags/v0.1.7 - Owner: https://github.com/TRACE-Structures
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@b39476c47abe7ec72d7e8f25f5d826e18d46a2d1 -
Trigger Event:
release
-
Statement type:
File details
Details for the file digital_twinning-0.1.7-py3-none-any.whl.
File metadata
- Download URL: digital_twinning-0.1.7-py3-none-any.whl
- Upload date:
- Size: 72.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbe237fd67e3c4915b39e1ce6db34fa14ef484139bf5faa3999650a41b00ed7c
|
|
| MD5 |
c3bded50700d4ac31e894ad18065423b
|
|
| BLAKE2b-256 |
6ea8bc0e63b081fcbee7fc9aec5effb3eff0f132c477cd2bf1a2a8e866738140
|
Provenance
The following attestation bundles were made for digital_twinning-0.1.7-py3-none-any.whl:
Publisher:
python-publish.yml on TRACE-Structures/digital_twinning
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
digital_twinning-0.1.7-py3-none-any.whl -
Subject digest:
cbe237fd67e3c4915b39e1ce6db34fa14ef484139bf5faa3999650a41b00ed7c - Sigstore transparency entry: 772836159
- Sigstore integration time:
-
Permalink:
TRACE-Structures/digital_twinning@b39476c47abe7ec72d7e8f25f5d826e18d46a2d1 -
Branch / Tag:
refs/tags/v0.1.7 - Owner: https://github.com/TRACE-Structures
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@b39476c47abe7ec72d7e8f25f5d826e18d46a2d1 -
Trigger Event:
release
-
Statement type: