Low-discrepancy points & sampling¶
=eindir= provides reproducible bounded low-discrepancy (Halton-based) point sets used for pilots, initialisation, QMC polish, and surrogate fitting across the simmAnneal stack.
API¶
low_discrepancy_points(low, high, n, skip=1)halton_unit(skip, dim)(unit hypercube)
Example: 2D starts for a bound-constrained problem¶
import numpy as np
from eindir import low_discrepancy_points, Bounds
low = np.array([-5.12, -5.12])
high = np.array([5.12, 5.12])
starts = low_discrepancy_points(low, high, 16, skip=42)
print(starts.shape) # (16, 2)
print("First 3:", starts[:3])
Why it matters¶
Low-discrepancy starts give better coverage than random for the same N, especially useful for Bayesian pilots, surrogate fitting, and QMC polish. The skip/seed controls reproducibility across runs and languages.
See also using with anneal (QMC starts for the mixer, polish, etc.).