SobolEngine generates quasi-random Sobol-sequence points in a unit cube. Its even space coverage makes it useful for populating candidates in expensive black-box optimization and Thompson sampling. section 5.3.2
Use SobolEngine by following these practical steps:
- Set the dimensionality and candidate count, then draw points with scramble enabled. section 5.3.2
- Resize the unit-cube tensor to the bounds of the actual search space. section 5.3.2
- Provide the candidates to Thompson sampling, which selects a point using a posterior Gaussian-process sample. section 5.3.2
Candidate generation
A one-dimensional setup draws 1,000 scrambled candidates with torch.quasirandom.SobolEngine(1, scramble=True), then maps them from [0, 1] to [-5, 5] before selecting the next evaluation. section 5.3.2
Figure 5.14 Points from a Sobol sequence vs. uniformly sampled points in the two-dimensional unit square. The Sobol sequence covers the square more evenly and, therefore, should be used by TS.
Compare Sobol points with uniformly sampled points to see why Sobol sequences cover the square more evenly. section 5.3.2
