Skip to content

Commit

Permalink
fix noise test bad indentation $
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul-Saves committed Mar 8, 2024
1 parent 9915412 commit 6463297
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions smt/surrogate_models/tests/test_krg_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ def setUp(self):
self.corr_def = corr_def
self.power_val = power_val

def test_noise_estimation(self):
xt = np.array([[0.0], [1.0], [2.0], [3.0], [4.0]])
yt = np.array([0.0, 1.0, 1.5, 0.9, 1.0])
sm = KRG(hyper_opt="Cobyla", eval_noise=True, noise0=[1e-4])

sm.set_training_values(xt, yt)
sm.train()
self.assert_error(np.array(sm.optimal_theta), np.array([1.6]), 1e-1, 1e-1)
def test_noise_estimation(self):
xt = np.array([[0.0], [1.0], [2.0], [3.0], [4.0]])
yt = np.array([0.0, 1.0, 1.5, 0.9, 1.0])
sm = KRG(hyper_opt="Cobyla", eval_noise=True, noise0=[1e-4])

sm.set_training_values(xt, yt)
sm.train()
self.assert_error(np.array(sm.optimal_theta), np.array([1.6]), 1e-1, 1e-1)

def test_corr_derivatives(self):
for ind, corr in enumerate(self.corr_def): # For every kernel
Expand Down

0 comments on commit 6463297

Please sign in to comment.