hyperactive.optimizers.optimizer_attributes   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 26
dl 0
loc 36
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A OptimizerAttributes.__init__() 0 8 1
A OptimizerAttributes._add_result_attributes() 0 17 1
1
"""optimizer_attributes module for Hyperactive optimization."""
2
3
# Email: [email protected]
4
# License: MIT License
5
6
7
class OptimizerAttributes:
8
    """OptimizerAttributes class."""
9
10
    def __init__(self):
11
        self.best_para = None
12
        self.best_score = None
13
        self.best_since_iter = None
14
        self.eval_times = None
15
        self.iter_times = None
16
        self.search_data = None
17
        self.random_seed = None
18
19
    def _add_result_attributes(
20
        self,
21
        best_para,
22
        best_score,
23
        best_since_iter,
24
        eval_times,
25
        iter_times,
26
        search_data,
27
        random_seed,
28
    ):
29
        self.best_para = best_para
30
        self.best_score = best_score
31
        self.best_since_iter = best_since_iter
32
        self.eval_times = eval_times
33
        self.iter_times = iter_times
34
        self.search_data = search_data
35
        self.random_seed = random_seed
36