Skip to main content

hdim-opt: High-Dimensional Optimization Toolkit

hdim_opt is a lightweight yet comprehensive Python toolkit to streamline numerical optimization, sampling, and analysis of high-dimensional function landscapes and datasets. It features several methods for sample initialization, derivative & derivative-free optimization, and statistical analyses & visualizations of the solution landscape.

hdim_opt provides single-line execution to streamline and improve upon common tasks that are inefficient to implement manually; particularly effective for black-box, high-dimensional, non-differentiable, non-parametric, multi-modal, multi-objective, and non-convex objective functions.

All core functions, listed below, are single-line executable and depend on three essential parameters: [obj_function, bounds, n_samples]:

Sampling

  • uniform: Generate uniform QMC sample sequences (via Scipy.stats.qmc).
  • hyperellipsoid: Generate hyperellipsoidal sample sequence; may accelerate optimization.
  • isotropize: Isotropize the input data via zero-phase component analysis (ZCA).
  • encode_bipolar: Bipolar-logarithmic transform, when negative values and exponents are present.

Optimization

  • quasar: Optimization using the QUASAR evolutionary algorithm.
  • minimize: Optimization using gradient-based minimization (via SciPy.minimize).
  • symbolic: Symbolic regression to approximate the input data or function (via gplearn).
  • stepAIC: Stepwise feature selection for linear or logistic regression (R's MASS:stepAIC).

Analysis

  • sensitivity: Sensitivity analysis to quantify each dimension's influence (via SALib).
  • hyperslice: Create a hyperslice of the function's underlying solution space.
  • waveform: Decompose any 2D waveform.
  • analyze: Analyze any input dataset.

Installation

Install hdim_opt from PyPI:

pip install hdim_opt

Example Usage

import hdim_opt as h

### Parameter Space
n_samples = 2**10
n_dimensions = 10
bounds = [(-100,100)] * n_dimensions # Parameter bounds
obj_func = h.test_functions.rastrigin # Test function

### Sampling
uniform_samples = h.uniform(n_samples, bounds, method='sobol') # Uniform sampling
ellipsoid_samples = h.hyperellipsoid(n_samples, bounds, verbose=True) # Hyperellipsoid sampling
iso_samples, iso_params = h.isotropize(ellipsoid_samples) # Isotropize data (ZCA)
bipolar_log_samples = h.encode_bipolar(iso_samples, [b[0] for b in bounds]) # Bipolar-logarithm transform

### Optimization
solution, fitness = h.quasar(obj_func, bounds, init=ellipsoid_samples) # Evolutionary optimization
local_sol, local_fit = h.minimize(obj_func, bounds, init=solution) # Gradient-based optimization
all_expr, best_expr = h.symbolic(obj_func, bounds) # Symbolic regression
opt_features, opt_model = h.stepAIC(iso_samples, solution) # R's stepAIC for feature selection & linear regression

### Analysis
Si, S2 = h.sensitivity(obj_func, bounds) # Sensitivity analysis
slice_data, stats = h.hyperslice(obj_func, bounds, slice_dims=(0,1), n_samples=2**7) # Estimate solution space
signal_results = h.waveform(uniform_samples[:,0], slice_data.iloc[:,1]) # Analyze 2D waveform
h.analyze(slice_data) # Analyze any numerical dataset

QUASAR Optimization

Quasi-Adaptive Search with Asymptotic Reinitialization is an evolutionary algorithm highly efficient for minimizing high-dimensional, non-differentiable, and non-parametric objective functions. ([https://arxiv.org/abs/2511.13843]).

Hyperellipsoid Sampling

Hyperellipsoid Density Sampling is a non-uniform Quasi-Monte Carlo sampling method, designed to exploit promising regions of the parameter space ([https://arxiv.org/abs/2511.07836]).

Issues & Support

Bug reports are highly appreciated and will be handled timely.

Metadata

Release files for hdim-opt 1.6.5

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

Source distribution (sdist)

Source distribution for hdim-opt 1.6.5
File Size Uploaded
hdim_opt-1.6.5.tar.gz 45.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hdim-opt 1.6.5
File Interpreter ABI Platform
hdim_opt-1.6.5-py3-none-any.whl Python 3 none any Details

Total release size: 92.4 kB

Release files / hdim_opt-1.6.5.tar.gz

Download URL hdim_opt-1.6.5.tar.gz
Size 45.6 kB
Tags Source
SHA-256 checksum
How to use checksums
7c247659569e0e7376aaa6fd646242f5e90b9058f44bc15599343aa6592ba800
BLAKE2b-256 checksum
How to use checksums
6d1ffd052ca140034d6a138ece772d39845fbd3a8665dad8b30434287ecb2d3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.1

Release files / hdim_opt-1.6.5-py3-none-any.whl

Download URL hdim_opt-1.6.5-py3-none-any.whl
Size 46.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b9171f2b3d5e4ebb29d4aa84e77ca5cd702fc19c33ba2e3c0a27cd2dd19222b3
BLAKE2b-256 checksum
How to use checksums
759aad6737d8f5165cfe6734ee5bdfa5ae63699d9d9fcbe8115fbe2ce52b27e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.1

Release history Release notifications | RSS feed

1.7.1

2 release files

1.7.0

2 release files

This release

1.6.5 This release

2 release files

1.6.4

2 release files

1.6.3

2 release files

1.6.2

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.81

2 release files

1.4.80

2 release files

1.4.72

2 release files

1.4.71

2 release files

1.4.8

2 release files

1.4.7

2 release files

1.4.6

2 release files

1.4.5

2 release files

1.4.4

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.8

2 release files

1.3.7

2 release files

1.3.6

2 release files

1.3.5

2 release files

1.3.4

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.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