Total Complexity | 3 |
Total Lines | 26 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | import numpy as np |
||
2 | from hyperactive import BaseSearchSpace |
||
3 | |||
4 | |||
5 | """ |
||
6 | Optional: |
||
7 | |||
8 | It might make sense to use a class instead of a dictionary for the search-space. |
||
9 | The search-space can have specifc properties, that can be computed from the params (previously called search-space-dictionary). |
||
10 | The search-space can have a certain size, has n dimensions, some of which are numeric, some of which are categorical. |
||
11 | """ |
||
12 | |||
13 | |||
14 | class SearchSpace: |
||
15 | search_space: dict = None |
||
16 | |||
17 | def __init__(self, **params): |
||
18 | super().__init__() |
||
19 | |||
20 | for key, value in params.items(): |
||
21 | setattr(self, key, value) |
||
22 | self.search_space[key] = value |
||
23 | |||
24 | def __call__(self): |
||
25 | return self.search_space |
||
26 |