Skip to main content

A comprehensive package for digital twin model updating and predictive modeling using machine learning and uncertainty quantification techniques

Project description

digital_twinning

DOI

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-validation
  • predict(): Make predictions on new data
  • get_shap_values(): Compute SHAP values for feature importance
  • get_sobol_sensitivity(): Perform Sobol sensitivity analysis
  • save_model() / load_model(): Serialize and deserialize models

DigitalTwin

MCMC-based Bayesian model updating for parameter estimation.

Methods:

  • update(): Update parameters using measurement data
  • get_mean_and_var_of_posterior(): Get posterior statistics
  • get_MAP(): Get maximum a posteriori estimate
  • loglikelihood(): Compute log-likelihood of measurements
  • logprior(): Compute log-prior of parameters

JointManager

Manage joint model updating for multiple buildings with shared parameters.

Methods:

  • update(): Perform joint update across all buildings
  • get_joint_paramset_and_indices(): Create joint parameter space
  • generate_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

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

digital_twinning-0.1.11.tar.gz (65.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

digital_twinning-0.1.11-py3-none-any.whl (71.7 kB view details)

Uploaded Python 3

File details

Details for the file digital_twinning-0.1.11.tar.gz.

File metadata

  • Download URL: digital_twinning-0.1.11.tar.gz
  • Upload date:
  • Size: 65.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for digital_twinning-0.1.11.tar.gz
Algorithm Hash digest
SHA256 6b33dcc79edfec2fe2e115cdb522fdf105cba68fc0115d836a3230c02b003852
MD5 ca00050c75e41375af7347e3fc2d0701
BLAKE2b-256 402be75701f749939b4d1a1115dc43ee68a827c67e52bb38fa91c9c9b1443159

See more details on using hashes here.

Provenance

The following attestation bundles were made for digital_twinning-0.1.11.tar.gz:

Publisher: python-publish.yml on TRACE-Structures/digital_twinning

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file digital_twinning-0.1.11-py3-none-any.whl.

File metadata

File hashes

Hashes for digital_twinning-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 6131fdf8a6a88b8829c6c81c7bdb7923d782fa8d5f2c760f0c80a7d057ed9d2c
MD5 8bfd4969bc7b6ff9e3620eec3fa5a2cd
BLAKE2b-256 5040501e2a5f50c4b1b55c6f1d2a3cc25094c63a6ff477035ae71687f3ef1904

See more details on using hashes here.

Provenance

The following attestation bundles were made for digital_twinning-0.1.11-py3-none-any.whl:

Publisher: python-publish.yml on TRACE-Structures/digital_twinning

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page