Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul-Saves committed Feb 14, 2024
1 parent e31ab31 commit 6610be2
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions smt/surrogate_models/krg_based.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,19 +375,19 @@ def _new_train(self):
self._corr_params = None
_, self.cat_features = compute_X_cont(self.X_train, self.design_space)
D = None # For SGP, D is not computed at all
# Center and scale X and y
(
self.X_norma,
self.y_norma,
self.X_offset,
self.y_mean,
self.X_scale,
self.y_std,
) = standardization(X.copy(), y.copy())

if not self.options["eval_noise"]:
self.optimal_noise = np.array(self.options["noise0"])
elif self.options["use_het_noise"]:
# Center and scale X and y
(
self.X_norma,
self.y_norma,
self.X_offset,
self.y_mean,
self.X_scale,
self.y_std,
) = standardization(X.copy(), y.copy())

# hetGP works with unique design variables when noise variance are not given
(
self.X_norma,
Expand Down Expand Up @@ -456,15 +456,15 @@ def _new_train(self):
mixint_type=MixIntKernelType.CONT_RELAX,
)

# Center and scale X_cont and y
(
self.X_norma,
self.y_norma,
self.X_offset,
self.y_mean,
self.X_scale,
self.y_std,
) = standardization(X_cont.copy(), y.copy())
# Center and scale X_cont and y
(
self.X_norma,
self.y_norma,
self.X_offset,
self.y_mean,
self.X_scale,
self.y_std,
) = standardization(X_cont.copy(), y.copy())

if self.name not in ["SGP"]:
if self.is_continuous:
Expand Down

0 comments on commit 6610be2

Please sign in to comment.