High Dimensional Model Representation (HDMR) and Enhanced Multivariate Products Representation (EMPR) library
Project description
HDMRLib
HDMRLib is an open-source Python library for High-Dimensional Model Representation (HDMR) and Enhanced Multivariate Products Representation (EMPR). It provides a unified workflow for decomposition, component analysis, and lower-order reconstruction across NumPy, PyTorch, and TensorFlow backends.
Features
- HDMR and EMPR in one library
- Unified decomposition workflow
- Component extraction and lower-order reconstruction
- NumPy, PyTorch, and TensorFlow support
- Documentation, examples, and tests
Installation
Install the package from PyPI:
pip install hdmrlib
For development installation:
git clone https://github.com/hdmrlib/HDMRLib.git
cd HDMRLib
pip install -e .
For optional backend dependencies and development tools, see the documentation.
Quick Example
import numpy as np
from hdmrlib import HDMR
X = np.random.rand(10, 10)
model = HDMR(X, order=2)
X_reconstructed = model.reconstruct()
components = model.components()
This computes a second-order HDMR decomposition of X, reconstructs the data from the decomposition, and returns the extracted component terms.
The same workflow also applies to EMPR:
from hdmrlib import EMPR
model = EMPR(X, order=2)
X_reconstructed = model.reconstruct()
components = model.components()
Documentation
Full documentation is available at:
- Documentation website: https://hdmrlib.github.io/HDMRLib/
Supported Backends
HDMRLib currently supports:
- NumPy for standard array-based workflows
- PyTorch for tensor computation and backend-integrated workflows
- TensorFlow for TensorFlow-based numerical workflows
Backend selection is handled through a unified interface, allowing the same decomposition workflow to be used across supported numerical libraries.
Testing
To install development dependencies and run the test suite:
pip install -e ".[dev]"
python -m pytest
If you want to test optional backends as well:
pip install -e ".[dev,all]"
python -m pytest
Citation
If you use HDMRLib in academic work, please cite the associated software or publication.
@software{hdmrlib,
title = {HDMRLib: A Python Library for HDMR and EMPR},
author = {Pınar Yalçın Güler and Muhammed Enis Şen and Buğra Eyidoğan},
year = {2026},
url = {https://github.com/hdmrlib/HDMRLib}
}
If a paper citation becomes available, it should be preferred here.
Contributing
Contributions, bug reports, and feature suggestions are welcome.
Please use the GitHub issue tracker for bug reports and discussions, and open a pull request for proposed changes.
License
This project is released under the terms of the license included in the repository.
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 hdmrlib-1.0.0.tar.gz.
File metadata
- Download URL: hdmrlib-1.0.0.tar.gz
- Upload date:
- Size: 20.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e8e15969281ef5bf6460f4a218b36a9f066ad2eca8d4d7b2b34bb8b961944e6
|
|
| MD5 |
b319c331dac1e60f44239ac841673662
|
|
| BLAKE2b-256 |
961d8f54e2dfb01970f0ed5540a06836387c1fa2c0d3cc6d7e602cbaa646d0fc
|
Provenance
The following attestation bundles were made for hdmrlib-1.0.0.tar.gz:
Publisher:
pypi.yml on hdmrlib/HDMRLib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hdmrlib-1.0.0.tar.gz -
Subject digest:
5e8e15969281ef5bf6460f4a218b36a9f066ad2eca8d4d7b2b34bb8b961944e6 - Sigstore transparency entry: 1352734210
- Sigstore integration time:
-
Permalink:
hdmrlib/HDMRLib@a897ea3a05394ab67aaa2a8a2f8b7c3971ea7b2b -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/hdmrlib
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@a897ea3a05394ab67aaa2a8a2f8b7c3971ea7b2b -
Trigger Event:
release
-
Statement type:
File details
Details for the file hdmrlib-1.0.0-py3-none-any.whl.
File metadata
- Download URL: hdmrlib-1.0.0-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e83b24ec7f26ba14a80da5c53cabe175e58eb31e4b4e1b38940d2f01521a8c25
|
|
| MD5 |
68bcc4bda7ba2491d958cece299258b8
|
|
| BLAKE2b-256 |
b0ce7e6fe5da7f0618e0e36bb2ee52fa9fe144c06438f8adb7ebe45b27b26145
|
Provenance
The following attestation bundles were made for hdmrlib-1.0.0-py3-none-any.whl:
Publisher:
pypi.yml on hdmrlib/HDMRLib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hdmrlib-1.0.0-py3-none-any.whl -
Subject digest:
e83b24ec7f26ba14a80da5c53cabe175e58eb31e4b4e1b38940d2f01521a8c25 - Sigstore transparency entry: 1352734309
- Sigstore integration time:
-
Permalink:
hdmrlib/HDMRLib@a897ea3a05394ab67aaa2a8a2f8b7c3971ea7b2b -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/hdmrlib
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@a897ea3a05394ab67aaa2a8a2f8b7c3971ea7b2b -
Trigger Event:
release
-
Statement type: