Skip to content

Commit

Permalink
add print
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul-Saves committed Mar 19, 2024
1 parent 666998b commit 95bc453
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions smt/applications/tests/test_ego.py
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,7 @@ def f_obj(X):
)
# To start the Bayesion optimization
n_iter = 2 # number of iterations
criterion = "EI" # infill criterion
criterion = "LCB" # infill criterion
ego = EGO(
n_iter=n_iter,
criterion=criterion,
Expand All @@ -1021,11 +1021,11 @@ def f_obj(X):
)
x_opt, y_opt, dnk, x_data, y_data = ego.optimize(fun=f_obj)
if ds.HAS_CONFIG_SPACE: # results differs wrt config_space impl
self.assertAlmostEqual(np.sum(y_data), 10.279144005986257, delta=1e-4)
self.assertAlmostEqual(np.sum(x_data), 31.639338100807414, delta=1e-4)
self.assertAlmostEqual(np.sum(y_data), 8.846225704750577 , delta=1e-4)
self.assertAlmostEqual(np.sum(x_data), 41.811925504901374 , delta=1e-4)
else:
self.assertAlmostEqual(np.sum(y_data), 8.03720874762883, delta=1e-4)
self.assertAlmostEqual(np.sum(x_data), 40.81192549, delta=1e-4)
self.assertAlmostEqual(np.sum(y_data), 7.8471910288712, delta=1e-4)
self.assertAlmostEqual(np.sum(x_data), 34.81192549 , delta=1e-4)

def test_ego_gek(self):
ego, fun = self.initialize_ego_gek()
Expand Down

0 comments on commit 95bc453

Please sign in to comment.