Code Duplication    Length = 11-11 lines in 2 locations

examples/optimizers/bayesian_optimization.py 1 location

@@ 44-54 (lines=11) @@
41
    def predict(self, X):
42
        return self.m.predict(X)
43
44
class GPR1:
45
    def __init__(self):
46
        self.gpr = GaussianProcessRegressor(
47
                kernel=Matern(nu=2.5), normalize_y=True, n_restarts_optimizer=10
48
            )
49
        
50
    def fit(self, X, y):
51
        self.gpr.fit(X, y)
52
53
    def predict(self, X):
54
        return self.gpr.predict(X, return_std=True)
55
56
57
opt = Hyperactive(X, y)

hyperactive/opt_args.py 1 location

@@ 12-22 (lines=11) @@
9
from numpy.random import normal
10
11
12
class GPR:
13
    def __init__(self):
14
        self.gpr = GaussianProcessRegressor(
15
                kernel=Matern(nu=2.5), normalize_y=True, n_restarts_optimizer=10
16
            )
17
        
18
    def fit(self, X, y):
19
        self.gpr.fit(X, y)
20
21
    def predict(self, X):
22
        return self.gpr.predict(X, return_std=True)
23
24
25
class Arguments: