deephyper.skopt.sampler.Sobol#
- class deephyper.skopt.sampler.Sobol(skip=0, randomize=True)[source]#
Bases:
InitialPointGenerator
Generates a new quasirandom Sobol’ vector with each call.
- Parameters:
:param Sobol’ sequences [1]_ provide \(n=2^m\) low discrepancy points in: :param \([0: :param 1)^{dim}\). Scrambling them makes them suitable for singular: :param integrands: :param provides a means of error estimation: :param and can improve their: :param rate of convergence.: :param There are many versions of Sobol’ sequences depending on their: :param ‘direction numbers’. Here: :param the maximum number of dimension is 40.: :param The routine adapts the ideas of Antonov and Saleev [2]_.: :param .. warning::: Sobol’ sequences are a quadrature rule and they lose their balance
properties if one uses a sample size that is not a power of 2, or skips the first point, or thins the sequence [5]_.
If \(n=2^m\) points are not enough then one should take \(2^M\) points for \(M>m\). When scrambling, the number R of independent replicates does not have to be a power of 2.
Sobol’ sequences are generated to some number \(B\) of bits. Then after \(2^B\) points have been generated, the sequence will repeat. Currently \(B=30\).
- Parameters:
References
----------
accurate (.. [1] I. M. Sobol. The distribution of points in a cube and the) – evaluation of integrals. Zh. Vychisl. Mat. i Mat. Phys., 7:784-802, 1967.
Antonov (.. [2]) – USSR Computational Mathematics and Mathematical Physics, Volume 19, 1980, pages 252 - 256.
Saleev – USSR Computational Mathematics and Mathematical Physics, Volume 19, 1980, pages 252 - 256.
- :paramUSSR Computational Mathematics and Mathematical Physics,
Volume 19, 1980, pages 252 - 256.
- Parameters:
Bratley (.. [3] Paul) – Algorithm 659: Implementing Sobol’s Quasirandom Sequence Generator, ACM Transactions on Mathematical Software, Volume 14, Number 1, pages 88-100, 1988.
Fox (Bennett) – Algorithm 659: Implementing Sobol’s Quasirandom Sequence Generator, ACM Transactions on Mathematical Software, Volume 14, Number 1, pages 88-100, 1988.
- :paramAlgorithm 659:
Implementing Sobol’s Quasirandom Sequence Generator, ACM Transactions on Mathematical Software, Volume 14, Number 1, pages 88-100, 1988.
- Parameters:
Fox (.. [4] Bennett) – Algorithm 647: Implementation and Relative Efficiency of Quasirandom Sequence Generators,
- :paramAlgorithm 647:
Implementation and Relative Efficiency of Quasirandom Sequence Generators,
- Parameters:
2008.08051 (.. [5] Art B. Owen. On dropping the first Sobol' point. arXiv) –
- :param :
Methods
Creates samples from Sobol' set.
init
Set the parameters of this initial point generator.
- generate(dimensions, n_samples, random_state=None)[source]#
Creates samples from Sobol’ set.
Args: dimensions : list, shape (n_dims,)
List of search space dimensions. Each search dimension can be defined either as
a (lower_bound, upper_bound) tuple (for Real or Integer dimensions),
a (lower_bound, upper_bound, “prior”) tuple (for Real dimensions),
as a list of categories (for Categorical dimensions), or
an instance of a Dimension object (Real, Integer or Categorical).
- n_samplesint
The order of the Sobol’ sequence. Defines the number of samples.
- random_stateint, RandomState instance, or None (default)
Set random state to something other than None for reproducible results.
Returns: sample : array_like (n_samples, dim)
Sobol’ set.