tests/test_DecisionTree.py 1 location
|
@@ 20-29 (lines=10) @@
|
17 |
|
init_positions = [np.array([0]), np.array([1]), np.array([2]), np.array([3])] |
18 |
|
|
19 |
|
|
20 |
|
def _base_test(opt): |
21 |
|
for nth_init in range(len(init_positions)): |
22 |
|
pos_new = opt.init_pos(nth_init) |
23 |
|
score_new = get_score(pos_new) |
24 |
|
opt.evaluate(score_new) |
25 |
|
|
26 |
|
for nth_iter in range(len(init_positions), n_iter): |
27 |
|
pos_new = opt.iterate(nth_iter) |
28 |
|
score_new = get_score(pos_new) |
29 |
|
opt.evaluate(score_new) |
30 |
|
|
31 |
|
|
32 |
|
def _test_DecisionTreeOptimizer(opt_para): |
tests/test_StochasticTunneling.py 1 location
|
@@ 20-29 (lines=10) @@
|
17 |
|
init_positions = [np.array([0]), np.array([1]), np.array([2]), np.array([3])] |
18 |
|
|
19 |
|
|
20 |
|
def _base_test(opt, init_positions): |
21 |
|
for nth_init in range(len(init_positions)): |
22 |
|
pos_new = opt.init_pos(nth_init) |
23 |
|
score_new = get_score(pos_new) |
24 |
|
opt.evaluate(score_new) |
25 |
|
|
26 |
|
for nth_iter in range(len(init_positions), n_iter): |
27 |
|
pos_new = opt.iterate(nth_iter) |
28 |
|
score_new = get_score(pos_new) |
29 |
|
opt.evaluate(score_new) |
30 |
|
|
31 |
|
|
32 |
|
def _test_StochasticTunnelingOptimizer( |
tests/TPE.py 1 location
|
@@ 20-29 (lines=10) @@
|
17 |
|
init_positions = [np.array([0]), np.array([1]), np.array([2]), np.array([3])] |
18 |
|
|
19 |
|
|
20 |
|
def _base_test(opt, init_positions): |
21 |
|
for nth_init in range(len(init_positions)): |
22 |
|
pos_new = opt.init_pos(nth_init) |
23 |
|
score_new = get_score(pos_new) |
24 |
|
opt.evaluate(score_new) |
25 |
|
|
26 |
|
for nth_iter in range(len(init_positions), n_iter): |
27 |
|
pos_new = opt.iterate(nth_iter) |
28 |
|
score_new = get_score(pos_new) |
29 |
|
opt.evaluate(score_new) |
30 |
|
|
31 |
|
|
32 |
|
def _test_TreeStructuredParzenEstimators( |
tests/test_EvolutionStrategy.py 1 location
|
@@ 20-29 (lines=10) @@
|
17 |
|
init_positions = [np.array([0]), np.array([1]), np.array([2]), np.array([3])] |
18 |
|
|
19 |
|
|
20 |
|
def _base_test(opt, init_positions): |
21 |
|
for nth_init in range(len(init_positions)): |
22 |
|
pos_new = opt.init_pos(nth_init) |
23 |
|
score_new = get_score(pos_new) |
24 |
|
opt.evaluate(score_new) |
25 |
|
|
26 |
|
for nth_iter in range(len(init_positions), n_iter): |
27 |
|
pos_new = opt.iterate(nth_iter) |
28 |
|
score_new = get_score(pos_new) |
29 |
|
opt.evaluate(score_new) |
30 |
|
|
31 |
|
|
32 |
|
def _test_EvolutionStrategyOptimizer( |
tests/test_SimulatedAnnealing.py 1 location
|
@@ 20-29 (lines=10) @@
|
17 |
|
init_positions = [np.array([0]), np.array([1]), np.array([2]), np.array([3])] |
18 |
|
|
19 |
|
|
20 |
|
def _base_test(opt, init_positions): |
21 |
|
for nth_init in range(len(init_positions)): |
22 |
|
pos_new = opt.init_pos(nth_init) |
23 |
|
score_new = get_score(pos_new) |
24 |
|
opt.evaluate(score_new) |
25 |
|
|
26 |
|
for nth_iter in range(len(init_positions), n_iter): |
27 |
|
pos_new = opt.iterate(nth_iter) |
28 |
|
score_new = get_score(pos_new) |
29 |
|
opt.evaluate(score_new) |
30 |
|
|
31 |
|
|
32 |
|
def _test_SimulatedAnnealingOptimizer( |
tests/test_RandomRestartHillClimbing.py 1 location
|
@@ 20-29 (lines=10) @@
|
17 |
|
init_positions = [np.array([0]), np.array([1]), np.array([2]), np.array([3])] |
18 |
|
|
19 |
|
|
20 |
|
def _base_test(opt, init_positions): |
21 |
|
for nth_init in range(len(init_positions)): |
22 |
|
pos_new = opt.init_pos(nth_init) |
23 |
|
score_new = get_score(pos_new) |
24 |
|
opt.evaluate(score_new) |
25 |
|
|
26 |
|
for nth_iter in range(len(init_positions), n_iter): |
27 |
|
pos_new = opt.iterate(nth_iter) |
28 |
|
score_new = get_score(pos_new) |
29 |
|
opt.evaluate(score_new) |
30 |
|
|
31 |
|
|
32 |
|
def _test_RandomRestartHillClimbingOptimizer( |
tests/test_RandomAnnealing.py 1 location
|
@@ 20-29 (lines=10) @@
|
17 |
|
init_positions = [np.array([0]), np.array([1]), np.array([2]), np.array([3])] |
18 |
|
|
19 |
|
|
20 |
|
def _base_test(opt, init_positions): |
21 |
|
for nth_init in range(len(init_positions)): |
22 |
|
pos_new = opt.init_pos(nth_init) |
23 |
|
score_new = get_score(pos_new) |
24 |
|
opt.evaluate(score_new) |
25 |
|
|
26 |
|
for nth_iter in range(len(init_positions), n_iter): |
27 |
|
pos_new = opt.iterate(nth_iter) |
28 |
|
score_new = get_score(pos_new) |
29 |
|
opt.evaluate(score_new) |
30 |
|
|
31 |
|
|
32 |
|
def _test_RandomAnnealingOptimizer( |
tests/test_ParticleSwarm.py 1 location
|
@@ 20-29 (lines=10) @@
|
17 |
|
init_positions = [np.array([0]), np.array([1]), np.array([2]), np.array([3])] |
18 |
|
|
19 |
|
|
20 |
|
def _base_test(opt, init_positions): |
21 |
|
for nth_init in range(len(init_positions)): |
22 |
|
pos_new = opt.init_pos(nth_init) |
23 |
|
score_new = get_score(pos_new) |
24 |
|
opt.evaluate(score_new) |
25 |
|
|
26 |
|
for nth_iter in range(len(init_positions), n_iter): |
27 |
|
pos_new = opt.iterate(nth_iter) |
28 |
|
score_new = get_score(pos_new) |
29 |
|
opt.evaluate(score_new) |
30 |
|
|
31 |
|
|
32 |
|
def _test_ParticleSwarmOptimizer( |
tests/test_Bayesian.py 1 location
|
@@ 20-29 (lines=10) @@
|
17 |
|
init_positions = [np.array([0]), np.array([1]), np.array([2]), np.array([3])] |
18 |
|
|
19 |
|
|
20 |
|
def _base_test(opt): |
21 |
|
for nth_init in range(len(init_positions)): |
22 |
|
pos_new = opt.init_pos(nth_init) |
23 |
|
score_new = get_score(pos_new) |
24 |
|
opt.evaluate(score_new) |
25 |
|
|
26 |
|
for nth_iter in range(len(init_positions), n_iter): |
27 |
|
pos_new = opt.iterate(nth_iter) |
28 |
|
score_new = get_score(pos_new) |
29 |
|
opt.evaluate(score_new) |
30 |
|
|
31 |
|
|
32 |
|
def _test_BayesianOptimizer(opt_para): |
tests/test_ParallelTempering.py 1 location
|
@@ 20-29 (lines=10) @@
|
17 |
|
init_positions = [np.array([0]), np.array([1]), np.array([2]), np.array([3])] |
18 |
|
|
19 |
|
|
20 |
|
def _base_test(opt, init_positions): |
21 |
|
for nth_init in range(len(init_positions)): |
22 |
|
pos_new = opt.init_pos(nth_init) |
23 |
|
score_new = get_score(pos_new) |
24 |
|
opt.evaluate(score_new) |
25 |
|
|
26 |
|
for nth_iter in range(len(init_positions), n_iter): |
27 |
|
pos_new = opt.iterate(nth_iter) |
28 |
|
score_new = get_score(pos_new) |
29 |
|
opt.evaluate(score_new) |
30 |
|
|
31 |
|
|
32 |
|
def _test_ParallelTemperingOptimizer( |
tests/test_StochasticHillClimbing.py 1 location
|
@@ 20-29 (lines=10) @@
|
17 |
|
init_positions = [np.array([0]), np.array([1]), np.array([2]), np.array([3])] |
18 |
|
|
19 |
|
|
20 |
|
def _base_test(opt, init_positions): |
21 |
|
for nth_init in range(len(init_positions)): |
22 |
|
pos_new = opt.init_pos(nth_init) |
23 |
|
score_new = get_score(pos_new) |
24 |
|
opt.evaluate(score_new) |
25 |
|
|
26 |
|
for nth_iter in range(len(init_positions), n_iter): |
27 |
|
pos_new = opt.iterate(nth_iter) |
28 |
|
score_new = get_score(pos_new) |
29 |
|
opt.evaluate(score_new) |
30 |
|
|
31 |
|
|
32 |
|
def _test_StochasticHillClimbingOptimizer( |
tests/test_HillClimbing.py 1 location
|
@@ 20-29 (lines=10) @@
|
17 |
|
init_positions = [np.array([0]), np.array([1]), np.array([2]), np.array([3])] |
18 |
|
|
19 |
|
|
20 |
|
def _base_test(opt, init_positions): |
21 |
|
for nth_init in range(len(init_positions)): |
22 |
|
pos_new = opt.init_pos(nth_init) |
23 |
|
score_new = get_score(pos_new) |
24 |
|
opt.evaluate(score_new) |
25 |
|
|
26 |
|
for nth_iter in range(len(init_positions), n_iter): |
27 |
|
pos_new = opt.iterate(nth_iter) |
28 |
|
score_new = get_score(pos_new) |
29 |
|
opt.evaluate(score_new) |
30 |
|
|
31 |
|
|
32 |
|
def _test_HillClimbingOptimizer( |
tests/test_TabuSearch.py 1 location
|
@@ 20-29 (lines=10) @@
|
17 |
|
init_positions = [np.array([0]), np.array([1]), np.array([2]), np.array([3])] |
18 |
|
|
19 |
|
|
20 |
|
def _base_test(opt, init_positions): |
21 |
|
for nth_init in range(len(init_positions)): |
22 |
|
pos_new = opt.init_pos(nth_init) |
23 |
|
score_new = get_score(pos_new) |
24 |
|
opt.evaluate(score_new) |
25 |
|
|
26 |
|
for nth_iter in range(len(init_positions), n_iter): |
27 |
|
pos_new = opt.iterate(nth_iter) |
28 |
|
score_new = get_score(pos_new) |
29 |
|
opt.evaluate(score_new) |
30 |
|
|
31 |
|
|
32 |
|
def _test_TabuOptimizer( |