Skip to main content

High Dimensional Model Representation (HDMR) and Enhanced Multivariate Products Representation (EMPR) library

Project description

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.

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

hdmrlib-1.0.0.tar.gz (20.6 kB view details)

Uploaded Source

Built Distribution

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

hdmrlib-1.0.0-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

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

Hashes for hdmrlib-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5e8e15969281ef5bf6460f4a218b36a9f066ad2eca8d4d7b2b34bb8b961944e6
MD5 b319c331dac1e60f44239ac841673662
BLAKE2b-256 961d8f54e2dfb01970f0ed5540a06836387c1fa2c0d3cc6d7e602cbaa646d0fc

See more details on using hashes here.

Provenance

The following attestation bundles were made for hdmrlib-1.0.0.tar.gz:

Publisher: pypi.yml on hdmrlib/HDMRLib

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

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

Hashes for hdmrlib-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e83b24ec7f26ba14a80da5c53cabe175e58eb31e4b4e1b38940d2f01521a8c25
MD5 68bcc4bda7ba2491d958cece299258b8
BLAKE2b-256 b0ce7e6fe5da7f0618e0e36bb2ee52fa9fe144c06438f8adb7ebe45b27b26145

See more details on using hashes here.

Provenance

The following attestation bundles were made for hdmrlib-1.0.0-py3-none-any.whl:

Publisher: pypi.yml on hdmrlib/HDMRLib

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