Skip to main content

Optimized Gauss-Hermite quadrature for high-dimensional Gaussian expectations

Project description

Optimized Gauss-Hermite Quadrature

Compute $\mathbb{E}[f(X)]$ for $X \sim \mathcal{N}(\mu, \Sigma)$ using optimized Gauss-Hermite quadrature with adaptive parameter optimization.

Installation

pip install optimized-gauss-hermite

Quick start

import numpy as np
from ogh_integration import ogh_integrate

Ex = np.array([0.5, -0.1])
Cx = np.array([[2.0, 0.5],
               [0.5, 1.0]])

def f(x):
    return np.prod(np.cos(x)**2, axis=0)

result = ogh_integrate(f, Ex, Cx)
print(f"E[f(X)] = {result:.12f}")

Packages

Package Purpose
gauss_hermite_quadrature Nodes, weights, full-grid and sparse-grid Gauss-Hermite rules
optimal_gauss_hermite Optimized quadrature with adaptive parameter optimization
ogh_integration High-level ogh_integrate() convenience wrapper

API

ogh_integrate(
    func,                     # f(X) where X is (dimX, N) → (N,)
    Ex,                       # mean (dimX,)
    Cx,                       # covariance (dimX, dimX), SPD
    *,                        # all remaining args must be named
    sample_num=None,          # sample points for optimization (auto if None)
    num_quad=3,               # quadrature level
    sparse_mode=False,        # True for sparse-grid (high-dim problems)
    poly_type="hermite",      # polynomial basis
    sample_type="latin",      # sampling: "latin", "sobol", "haltonset", "MC"
    algorithm_type="levenberg-marquardt",  # "hybrid" or "hessian"
    decomp_type="Chol",       # "Chol" or "LDL"
)

Requirements

  • Python ≥ 3.9
  • numpy ≥ 1.20
  • scipy ≥ 1.7

Citation

@inproceedings{ogh2024,
  title     = {Optimized Gauss-Hermite Quadrature for High-Dimensional Gaussian Expectations},
  booktitle = {2024 IEEE Conference on Decision and Control (CDC)},
  author    = {Meng, Haozhan},
  year      = {2024},
  publisher = {IEEE},
  url       = {https://ieeexplore.ieee.org/abstract/document/10590620}
}

License

MIT

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

optimized_gauss_hermite-0.1.0.tar.gz (25.0 kB view details)

Uploaded Source

Built Distribution

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

optimized_gauss_hermite-0.1.0-py3-none-any.whl (33.3 kB view details)

Uploaded Python 3

File details

Details for the file optimized_gauss_hermite-0.1.0.tar.gz.

File metadata

  • Download URL: optimized_gauss_hermite-0.1.0.tar.gz
  • Upload date:
  • Size: 25.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for optimized_gauss_hermite-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2cd04cbc43587e4a2b5b5b806e9be2d82f472a628c8afe0d88b9c7b848ff536a
MD5 b75bebb09dc14dfec0278641a23694b3
BLAKE2b-256 71a3322f5c68dee7a0d11f09e09e3601f2ecc06d32af9cb4baa68125eec15707

See more details on using hashes here.

File details

Details for the file optimized_gauss_hermite-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for optimized_gauss_hermite-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 60ab516e3ab70580b74e61b59b8bfb7633da680bdfea2d2684e7098fd268b7a9
MD5 f5b0349af90ce5a424dcaeef815546d6
BLAKE2b-256 a80a9de2e8a8ddba92d9884e2c6b413448c6f81c8769418e4554a1a9b45f48d4

See more details on using hashes here.

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