HDMRLib
HDMRLib is an open-source Python library for High-Dimensional Model Representation (HDMR) and Enhanced Multivariance 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
Documentation
Full documentation is available at:
- Documentation website: https://hdmrlib.github.io/HDMRLib/
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()
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, and Süha Tuna},
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.
Metadata
Release files for hdmrlib 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hdmrlib-1.0.1.tar.gz | 20.7 kB | With provenance | Details for hdmrlib-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hdmrlib-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for hdmrlib-1.0.1-py3-none-any.whl |
Total release size: 36.0 kB
Release files / hdmrlib-1.0.1.tar.gz
| Download URL | hdmrlib-1.0.1.tar.gz |
|---|---|
| Size | 20.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
27ec58877e4ef7eb517371ad3dc264884f51f4ab223b57f63bf36f88925bf34c
|
|
BLAKE2b-256 checksum How to use checksums |
04a8580ad62483d8aa4db4b8f0f38ca4a904cd8353b14beddaa0737bfafc16ef
|
| 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 Nov 30, 2026.
Transparency logRelease files / hdmrlib-1.0.1-py3-none-any.whl
| Download URL | hdmrlib-1.0.1-py3-none-any.whl |
|---|---|
| Size | 15.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e6fd62ad31eeeb23ce044cb210596c000ccee46a250d9cb976d889389f36b492
|
|
BLAKE2b-256 checksum How to use checksums |
168168a7b34d4a9dd487369b6312739e5ef8430e320b63724157cd5959bcae04
|
| 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 Nov 30, 2026.
Transparency logSecurity for hdmrlib 1.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
Both files in this release have been uploaded with provenance metadata.
Attestation for hdmrlib-1.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 Nov 30, 2026.
Transparency logA 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.