Total Complexity | 2 |
Total Lines | 12 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | import numpy as np |
||
2 | |||
3 | from hyperactive.experiment import BaseExperiment |
||
4 | |||
5 | |||
6 | class SphereFunction(BaseExperiment): |
||
7 | def setup(self, n_dim=2): |
||
8 | self.n_dim = n_dim |
||
9 | |||
10 | def objective_function(self, params): |
||
11 | return np.sum(params["x0"] ** 2 + params["x1"] ** 2) |
||
12 |