Total Complexity | 1 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | # Author: Simon Blanke |
||
2 | # Email: [email protected] |
||
3 | # License: MIT License |
||
4 | |||
5 | import pytest |
||
6 | |||
7 | |||
8 | from gradient_free_optimizers import HillClimbingOptimizer |
||
9 | from ._base_para_test import _base_para_test_func |
||
10 | |||
11 | |||
12 | hill_climbing_para = [ |
||
13 | ({"epsilon": 0.0001}), |
||
14 | ({"epsilon": 1}), |
||
15 | ({"epsilon": 10}), |
||
16 | ({"epsilon": 10000}), |
||
17 | ({"distribution": "normal"}), |
||
18 | ({"distribution": "laplace"}), |
||
19 | ({"distribution": "logistic"}), |
||
20 | ({"distribution": "gumbel"}), |
||
21 | ({"n_neighbours": 1}), |
||
22 | ({"n_neighbours": 10}), |
||
23 | ({"n_neighbours": 100}), |
||
24 | ({"rand_rest_p": 0}), |
||
25 | ({"rand_rest_p": 0.5}), |
||
26 | ({"rand_rest_p": 1}), |
||
27 | ({"rand_rest_p": 10}), |
||
28 | ] |
||
29 | |||
30 | |||
31 | pytest_wrapper = ("opt_para", hill_climbing_para) |
||
32 | |||
33 | |||
34 | @pytest.mark.parametrize(*pytest_wrapper) |
||
35 | def test_hill_climbing_para(opt_para): |
||
36 | _base_para_test_func(opt_para, HillClimbingOptimizer) |
||
37 |