3c956a6c512724ca3f75062ffcae40dfc0568427,examples/sampler/sampling_comparison.py,,,#,117

Before Change



// Random search
dummy_res = run_measure( "random", n_random_starts)
lhs_res = run_measure("lhs", n_random_starts,
                      {"lhs_type": "classic",
                       "criterion": None})
lhs2_res = run_measure("lhs", n_random_starts,
                       {"criterion": "maximin"})
sobol_res = run_measure("sobol", n_random_starts,
                        {"randomize": False,
                         "min_skip": 1, "max_skip": 100})
halton_res = run_measure("halton", n_random_starts)
hammersly_res = run_measure("hammersly", n_random_starts)

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Note that this can take a few minutes.

plot = plot_convergence([("random", dummy_res),
                        ("lhs", lhs_res),
                        ("lhs_maximin", lhs2_res),
                        ("sobol", sobol_res),
                        ("halton", halton_res),
                        ("hammersly", hammersly_res)],
                        true_minimum=true_minimum,
                        yscale=yscale,
                        title=title)

plt.show()

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// This plot shows the value of the minimum found (y axis) as a function
// of the number of iterations performed so far (x axis). The dashed red line
// indicates the true value of the minimum of the :class:`benchmarks.hart6`
// function.

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Test with different n_random_starts values
lhs2_15_res = run_measure("lhs", 12,
                          {"criterion": "maximin"})
lhs2_20_res = run_measure("lhs", 14,
                          {"criterion": "maximin"})
lhs2_25_res = run_measure("lhs", 16,
                          {"criterion": "maximin"})

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// n_random_starts = 10 produces the best results

After Change


sobol_res = run_measure(sobol, n_initial_points)
halton_res = run_measure("halton", n_initial_points)
hammersly_res = run_measure("hammersly", n_initial_points)
grid_res = run_measure("grid", n_initial_points)

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Note that this can take a few minutes.

plot = plot_convergence([("random", dummy_res),
                        ("lhs", lhs_res),
                        ("lhs_maximin", lhs2_res),
                        ("sobol", sobol_res),
                        ("halton", halton_res),
                        ("hammersly", hammersly_res),
                        ("grid", grid_res)],
                        true_minimum=true_minimum,
                        yscale=yscale,
                        title=title)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 21

Instances


Project Name: scikit-optimize/scikit-optimize
Commit Name: 3c956a6c512724ca3f75062ffcae40dfc0568427
Time: 2020-02-20
Author: holgernahrstaedt@gmx.de
File Name: examples/sampler/sampling_comparison.py
Class Name:
Method Name:


Project Name: scikit-optimize/scikit-optimize
Commit Name: 24b57d44d27fc6a9a9c4dff4cac5c7c7d8025e67
Time: 2020-02-20
Author: holgernahrstaedt@gmx.de
File Name: examples/sampler/sampling_comparison.py
Class Name:
Method Name:


Project Name: scikit-optimize/scikit-optimize
Commit Name: 3c956a6c512724ca3f75062ffcae40dfc0568427
Time: 2020-02-20
Author: holgernahrstaedt@gmx.de
File Name: examples/sampler/sampling_comparison.py
Class Name:
Method Name:


Project Name: scikit-optimize/scikit-optimize
Commit Name: ddca7f56ce7a154c2284d6464cf872a1f4992f3d
Time: 2020-02-20
Author: holgernahrstaedt@gmx.de
File Name: examples/sampler/sampling_comparison.py
Class Name:
Method Name: