85317dad0531c04e41c94d30e0667032f7d17aff,skopt/samples/sobol.py,Sobol,generate,#Sobol#Any#Any#Any#,190
Before Change
for j in range(n_samples):
r[j, 0:n_dim], seed = self._sobol(n_dim, seed)
if self.randomize:
return space.inverse_transform(_random_shift(r, random_state))
return space.inverse_transform(r)
def _sobol(self, dim_num, seed):
Generates a new quasirandom Sobol vector with each call.
After Change
rng = check_random_state(random_state)
space = Space(dimensions)
n_dim = space.n_dims
transformer = space.get_transformer()
space.set_transformer("normalize")
r = np.full((n_samples, n_dim), np.nan)
if self.min_skip == self.max_skip:
seed = self.min_skip
else:
seed = rng.randint(self.min_skip, self.max_skip)
for j in range(n_samples):
r[j, 0:n_dim], seed = self._sobol(n_dim, seed)
if self.randomize:
r = space.inverse_transform(_random_shift(r, random_state))
r = space.inverse_transform(r)
space.set_transformer(transformer)
return r
def _sobol(self, dim_num, seed):
Generates a new quasirandom Sobol vector with each call.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances Project Name: scikit-optimize/scikit-optimize
Commit Name: 85317dad0531c04e41c94d30e0667032f7d17aff
Time: 2020-02-18
Author: holgernahrstaedt@gmx.de
File Name: skopt/samples/sobol.py
Class Name: Sobol
Method Name: generate
Project Name: scikit-optimize/scikit-optimize
Commit Name: 85317dad0531c04e41c94d30e0667032f7d17aff
Time: 2020-02-18
Author: holgernahrstaedt@gmx.de
File Name: skopt/samples/hammersly.py
Class Name: Hammersly
Method Name: generate
Project Name: scikit-optimize/scikit-optimize
Commit Name: 85317dad0531c04e41c94d30e0667032f7d17aff
Time: 2020-02-18
Author: holgernahrstaedt@gmx.de
File Name: skopt/samples/halton.py
Class Name: Halton
Method Name: generate
Project Name: scikit-optimize/scikit-optimize
Commit Name: 85317dad0531c04e41c94d30e0667032f7d17aff
Time: 2020-02-18
Author: holgernahrstaedt@gmx.de
File Name: skopt/samples/sobol.py
Class Name: Sobol
Method Name: generate