Skip to content

Commit

Permalink
Fix Sobol' typos in usage
Browse files Browse the repository at this point in the history
  • Loading branch information
tupui committed Sep 28, 2020
1 parent 16ef270 commit bebab29
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 deletions.
10 changes: 5 additions & 5 deletions examples/sampler/initial-sampling-method-integer.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
(10 by default). The downside to this is that there is no guarantee that
these samples are spread out evenly across all the dimensions.
Sampling methods as Latin hypercube, Sobol, Halton and Hammersly
Sampling methods as Latin hypercube, Sobol', Halton and Hammersly
take advantage of the fact that we know beforehand how many random
points we want to sample. Then these points can be "spread out" in
such a way that each dimension is explored.
Expand Down Expand Up @@ -64,15 +64,15 @@ def plot_searchspace(x, title):
x_label.append("random")

#############################################################################
# Sobol
# -----
# Sobol'
# ------

sobol = Sobol()
x = sobol.generate(space.dimensions, n_samples)
plot_searchspace(x, 'Sobol')
plot_searchspace(x, "Sobol'")
print("empty fields: %d" % (36 - np.size(np.unique(x, axis=0), 0)))
pdist_data.append(pdist(x).flatten())
x_label.append("sobol")
x_label.append("sobol'")

#############################################################################
# Classic latin hypercube sampling
Expand Down
10 changes: 5 additions & 5 deletions examples/sampler/initial-sampling-method.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
(10 by default). The downside to this is that there is no guarantee that
these samples are spread out evenly across all the dimensions.
Sampling methods as Latin hypercube, Sobol, Halton and Hammersly
Sampling methods as Latin hypercube, Sobol', Halton and Hammersly
take advantage of the fact that we know beforehand how many random
points we want to sample. Then these points can be "spread out" in
such a way that each dimension is explored.
Expand Down Expand Up @@ -64,14 +64,14 @@ def plot_searchspace(x, title):
x_label.append("random")

#############################################################################
# Sobol
# -----
# Sobol'
# ------

sobol = Sobol()
x = sobol.generate(space.dimensions, n_samples)
plot_searchspace(x, 'Sobol')
plot_searchspace(x, "Sobol'")
pdist_data.append(pdist(x).flatten())
x_label.append("sobol")
x_label.append("sobol'")

#############################################################################
# Classic Latin hypercube sampling
Expand Down
4 changes: 2 additions & 2 deletions examples/sampler/sampling_comparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* Halton sequence,
* Hammersly sequence,
* Sobol sequence and
* Sobol' sequence and
* Latin hypercube sampling
as initial points. The purely random point generation is used as
Expand Down Expand Up @@ -153,7 +153,7 @@ def run_measure(initial_point_generator, n_initial_points=10):
plot = plot_convergence([("random", dummy_res),
("lhs", lhs_res),
("lhs_maximin", lhs2_res),
("sobol", sobol_res),
("sobol'", sobol_res),
("halton", halton_res),
("hammersly", hammersly_res),
("grid", grid_res)],
Expand Down
2 changes: 1 addition & 1 deletion skopt/optimizer/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def base_minimize(func, dimensions, base_estimator,
Sets a initial points generator. Can be either
- `"random"` for uniform random numbers,
- `"sobol"` for a Sobol sequence,
- `"sobol"` for a Sobol' sequence,
- `"halton"` for a Halton sequence,
- `"hammersly"` for a Hammersly sequence,
- `"lhs"` for a latin hypercube sequence,
Expand Down
2 changes: 1 addition & 1 deletion skopt/optimizer/dummy.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def dummy_minimize(func, dimensions, n_calls=100,
Sets a initial points generator. Can be either
- `"random"` for uniform random numbers,
- `"sobol"` for a Sobol sequence,
- `"sobol"` for a Sobol' sequence,
- `"halton"` for a Halton sequence,
- `"hammersly"` for a Hammersly sequence,
- `"lhs"` for a latin hypercube sequence,
Expand Down
2 changes: 1 addition & 1 deletion skopt/optimizer/forest.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def forest_minimize(func, dimensions, base_estimator="ET", n_calls=100,
Sets a initial points generator. Can be either
- `"random"` for uniform random numbers,
- `"sobol"` for a Sobol sequence,
- `"sobol"` for a Sobol' sequence,
- `"halton"` for a Halton sequence,
- `"hammersly"` for a Hammersly sequence,
- `"lhs"` for a latin hypercube sequence,
Expand Down
2 changes: 1 addition & 1 deletion skopt/optimizer/gbrt.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def gbrt_minimize(func, dimensions, base_estimator=None,
Sets a initial points generator. Can be either
- `"random"` for uniform random numbers,
- `"sobol"` for a Sobol sequence,
- `"sobol"` for a Sobol' sequence,
- `"halton"` for a Halton sequence,
- `"hammersly"` for a Hammersly sequence,
- `"lhs"` for a latin hypercube sequence,
Expand Down
2 changes: 1 addition & 1 deletion skopt/optimizer/gp.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def gp_minimize(func, dimensions, base_estimator=None,
Sets a initial points generator. Can be either
- `"random"` for uniform random numbers,
- `"sobol"` for a Sobol sequence,
- `"sobol"` for a Sobol' sequence,
- `"halton"` for a Halton sequence,
- `"hammersly"` for a Hammersly sequence,
- `"lhs"` for a latin hypercube sequence,
Expand Down
2 changes: 1 addition & 1 deletion skopt/optimizer/optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class Optimizer(object):
Sets a initial points generator. Can be either
- `"random"` for uniform random numbers,
- `"sobol"` for a Sobol sequence,
- `"sobol"` for a Sobol' sequence,
- `"halton"` for a Halton sequence,
- `"hammersly"` for a Hammersly sequence,
- `"lhs"` for a latin hypercube sequence,
Expand Down

0 comments on commit bebab29

Please sign in to comment.