Skip to main content

Website PyPI version Docs Python versions Tests License

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.

Library Overview

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:

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.

Metadata

Release files for hdmrlib 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hdmrlib 1.0.0
File Size Uploaded
hdmrlib-1.0.0.tar.gz 20.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hdmrlib 1.0.0
File Interpreter ABI Platform
hdmrlib-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 36.2 kB

Release files / hdmrlib-1.0.0.tar.gz

Download URL hdmrlib-1.0.0.tar.gz
Size 20.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5e8e15969281ef5bf6460f4a218b36a9f066ad2eca8d4d7b2b34bb8b961944e6
BLAKE2b-256 checksum
How to use checksums
961d8f54e2dfb01970f0ed5540a06836387c1fa2c0d3cc6d7e602cbaa646d0fc
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 Apr 21, 2026.

Transparency log

Release files / hdmrlib-1.0.0-py3-none-any.whl

Download URL hdmrlib-1.0.0-py3-none-any.whl
Size 15.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e83b24ec7f26ba14a80da5c53cabe175e58eb31e4b4e1b38940d2f01521a8c25
BLAKE2b-256 checksum
How to use checksums
b0ce7e6fe5da7f0618e0e36bb2ee52fa9fe144c06438f8adb7ebe45b27b26145
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 Apr 21, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page