Skip to content

Commit

Permalink
Merge branch 'master' into variance_derivative_style
Browse files Browse the repository at this point in the history
  • Loading branch information
LDAP authored Jan 12, 2021
2 parents 172fd9b + 7514c36 commit d0e0144
Show file tree
Hide file tree
Showing 17 changed files with 272 additions and 74 deletions.
61 changes: 55 additions & 6 deletions doc/_src_docs/surrogate_models/kpls.rst

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified doc/_src_docs/surrogate_models/kpls_Test_test_kpls.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 44 additions & 6 deletions doc/_src_docs/surrogate_models/kplsk.rst

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified doc/_src_docs/surrogate_models/kplsk_Test_test_kplsk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 52 additions & 7 deletions doc/_src_docs/surrogate_models/krg.rst

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified doc/_src_docs/surrogate_models/krg_Test_test_krg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/_src_docs/surrogate_models/krg_Test_test_mixed_int_krg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion smt/applications/mfk.py
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,9 @@ def _check_param(self):
if len(self.options["theta0"]) == 1:
self.options["theta0"] *= np.ones((self.nlvl, d))
elif len(self.options["theta0"]) == self.nlvl:
self.options["theta0"] = np.array(self.options["theta0"]).reshape(-1, 1)
self.options["theta0"] = np.array(self.options["theta0"]).reshape(
-1, 1
)
self.options["theta0"] *= np.ones((1, d))
else:
raise ValueError(
Expand Down
11 changes: 8 additions & 3 deletions smt/applications/tests/test_ego.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def test_function_test_1d_parallel(self):
self.assertAlmostEqual(-15.1, float(y_opt), delta=1)

def test_rosenbrock_2D(self):
n_iter = 40
n_iter = 50
fun = Rosenbrock(ndim=2)
xlimits = fun.xlimits
criterion = "UCB" #'EI' or 'SBO' or 'UCB'
Expand All @@ -106,7 +106,7 @@ def test_rosenbrock_2D(self):
n_iter=n_iter,
criterion=criterion,
xlimits=xlimits,
random_state=0, # change seed as it fails on travis macos py3.7
random_state=0,
)

x_opt, y_opt, _, _, _ = ego.optimize(fun=fun)
Expand Down Expand Up @@ -299,7 +299,12 @@ def test_ydoe_option(self):
ydoe = fun(xdoe)

ego = EGO(
xdoe=xdoe, ydoe=ydoe, n_iter=n_iter, criterion=criterion, xlimits=xlimits
xdoe=xdoe,
ydoe=ydoe,
n_iter=n_iter,
criterion=criterion,
xlimits=xlimits,
random_state=42,
)
_, y_opt, _, _, _ = ego.optimize(fun=fun)

Expand Down
Loading

0 comments on commit d0e0144

Please sign in to comment.