gPCE_model
A Python package implementing generalized Polynomial Chaos Expansion (gPCE) for uncertainty quantification and surrogate modeling. The software is built on Elmar Zander's sglib approach.
- Website: https://buildchain.ilab.sztaki.hu/
- Source code: https://github.com/TRACE-Structures/gPCE_model
- Bug reports: https://github.com/TRACE-Structures/gPCE_model/issues
Overview
The gPCE_model package provides a complete framework for building and using generalized Polynomial Chaos Expansion (gPCE) surrogate models. These models efficiently approximate computational expensive simulations while quantifying uncertainty in the outputs. The implementation supports various polynomial systems, multi-index generation, and comprehensive uncertainty analysis including Sobol sensitivity indices.
Installation
pip install gPCE-model
Features
- Generalized Polynomial Chaos Expansion: Build surrogate models using orthogonal polynomial bases
- Multiple Training Methods:
- Regression-based coefficient computation
- Projection-based coefficient computation
- Multi-index Management: Flexible basis construction with total degree or full tensor product
- Uncertainty Quantification:
- Mean and variance computation
- Sobol sensitivity indices (partial variances)
- SHAP value integration for interpretability
- Orthogonal Polynomial Support: Works with various polynomial systems (Hermite, Legendre, Jacobi, etc.)
- Model Export: JSON-LD metadata export for interoperability
Core Components
GpcModel Class
The main class for generalized polynomial chaos expansion models.
Key Attributes:
basis: GpcBasis object containing basis functionsQ: VariableSet defining probabilistic input variablesu_alpha_i: Coefficients of the gPCE expansionp: Maximum polynomial degree
Key Methods:
compute_coeffs_by_regression(q_k_j, u_k_i): Train using least squares regressioncompute_coeffs_by_projection(q_k_j, u_k_i, w_k): Train using quadrature projectionpredict(q_k_j): Predict output at new input pointsmean(): Compute mean of the gPCE modelvariance(): Compute variance of the gPCE modelcompute_partial_vars(model_obj, max_index=1): Compute Sobol sensitivity indices
GpcBasis Class
Manages the polynomial basis functions for gPCE.
Key Attributes:
m: Number of random variablessyschars: System characters defining polynomial typesp: Maximum polynomial degreeI: Multi-index set defining basis functions
Key Methods:
evaluate(xi, dual=False): Evaluate basis functions at given pointsnorm(do_sqrt=True): Compute norm of basis functionssize(): Get size of the multi-index set
Multi-index Functions
Functions for generating and managing multi-index sets.
multiindex(m, p, full_tensor=False): Generate multi-index set for m variables and degree pnp_sortrows(M, columns=None): Sort rows of 2D array by specified columns
Authors and acknowledgment
The code is developed by András Urbanics, 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
- uncertain_variables: Probabilistic variable management
- digital_twinning: Digital Twinning
Support
For questions or issues, please refer to the project repository or contact the development team.
Metadata
Release files for gPCE-model 0.1.23
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gpce_model-0.1.23.tar.gz | 23.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gpce_model-0.1.23-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 46.3 kB
Release files / gpce_model-0.1.23.tar.gz
| Download URL | gpce_model-0.1.23.tar.gz |
|---|---|
| Size | 23.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
47fc6d9a7fd74a68738abf5951efa2a5faf586f8a18c7d107aef00c95f987892
|
|
BLAKE2b-256 checksum How to use checksums |
8c01990370300e8e17183035b22089eea2ee8ea41fb5e969f7cab286b31efb20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 17, 2026.
Transparency logRelease files / gpce_model-0.1.23-py3-none-any.whl
| Download URL | gpce_model-0.1.23-py3-none-any.whl |
|---|---|
| Size | 23.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
58cbb8fefd61baa0a42223c5b1d22b11ff15b5e3f652a115325c097cdcc99252
|
|
BLAKE2b-256 checksum How to use checksums |
750d490c7df6e70eaf4dfc708d433fa2f61512c22692ddd1ae1e07c4a3c46b28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 17, 2026.
Transparency log