Passed
Push — master ( 44bd28...268666 )
by Simon
03:57
created

test_n_neighbours()   A

Complexity

Conditions 2

Size

Total Lines 4
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 4
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
# Author: Simon Blanke
2
# Email: [email protected]
3
# License: MIT License
4
5
6
from gradient_free_optimizers import HillClimbingOptimizer
7
from ._base_test import _base_test
8
9
n_iter = 100
10
opt = HillClimbingOptimizer
11
12
13
def test_epsilon():
14
    for epsilon in [0.00001, 100]:
15
        opt_para = {"epsilon": epsilon}
16
        _base_test(opt, n_iter, opt_para=opt_para)
17
18
19
def test_n_neighbours():
20
    for n_neighbours in [1, 100]:
21
        opt_para = {"n_neighbours": n_neighbours}
22
        _base_test(opt, n_iter, opt_para=opt_para)
23