From 6463297189a5d20c1be866dc651988abfddcc498 Mon Sep 17 00:00:00 2001 From: Paul-Saves Date: Fri, 8 Mar 2024 08:25:01 +0100 Subject: [PATCH] fix noise test bad indentation $ --- smt/surrogate_models/tests/test_krg_training.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/smt/surrogate_models/tests/test_krg_training.py b/smt/surrogate_models/tests/test_krg_training.py index e22a4cafe..0b32204e7 100644 --- a/smt/surrogate_models/tests/test_krg_training.py +++ b/smt/surrogate_models/tests/test_krg_training.py @@ -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