Passed
Push — master ( 4ef66c...afb360 )
by Simon
03:52
created

test_start_temp()   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
import numpy as np
6
7
from gradient_free_optimizers import SimulatedAnnealingOptimizer
8
from ._base_test import _base_test
9
10
n_iter = 33
11
opt = SimulatedAnnealingOptimizer
12
13
14
def test_annealing_rate():
15
    for annealing_rate in [1, 0.001]:
16
        opt_para = {"annealing_rate": annealing_rate}
17
        _base_test(opt, n_iter, opt_para=opt_para)
18
19
20
def test_start_temp():
21
    for start_temp in [0.001, 10000]:
22
        opt_para = {"start_temp": start_temp}
23
        _base_test(opt, n_iter, opt_para=opt_para)
24