Skip to content

Commit

Permalink
Prepare smt 2.1 (#95)
Browse files Browse the repository at this point in the history
* fix bug smt2.0b3 (#93)

* fix sampler

* black

* kwargs

* fix rounding lhs

* fix definitevely

* black

* test

* remove ==[] for future deprecations

* remove ==[] for future deprecations

* commit from Jasper for smt 2.1 (#90) (#94)

* commit from Jasper for smt 2.1 (#90)

* commit from Jasper for smt 2.1

* fix?

* fix?

* clean

* fix bug

* fix bug3é

* clean

* clean

* fix new

* fix sampler

* black

* kwargs

* fix rounding lhs

* fix definitevely

* black

* test

* remove ==[] for future deprecations

* remove ==[] for future deprecations

* update smt

* black

* fix seeding'

* fix sampling'

* fix sampling with cs

* fix sampling again

* fix test

* fix texts

* black

* fix test

* i was there before the august leave

* add categorical decreed kernels for cont_relax

* final commit for the first attempt at implemented categorical decreed kernel for CONT_RELAX categorical kernel

* fix indent errorr

* add test

* add continuous decreed for gower kernels

* add categorical decreed for gower kernels

* add hh and ehh through imp

* horrible error_ was fixed

* fix more properly

* rename new_sampler in  use_new_sampler

* rename new_sampler in  use_new_sampler

* simplify testing clauses

* simplify testing clauses

* simplify testing clauses

* black and fix

* fix sampling smt2.1

* fix sampling smt2.1

* fix sampling smt2.1
  • Loading branch information
Paul-Saves authored Aug 24, 2023
1 parent 40ea6d3 commit 37e80b2
Show file tree
Hide file tree
Showing 10 changed files with 1,316 additions and 123 deletions.
39 changes: 34 additions & 5 deletions doc/_src_docs/applications/Mixed_Hier_usage.rst

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

5 changes: 5 additions & 0 deletions doc/_src_docs/applications/Mixed_Hier_usage.rstx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ The design space definition uses the framework of Audet et al. [2]_ to manage bo
hierarchical variables. We distinguish dimensional (or meta) variables which are a special type of variables that may
affect the dimension of the problem and decide if some other decreed variables are acting or non-acting.

Additionally, it is also possible to define value constraints that explicitly forbid two variables from having some
values simultaneously. This can be useful for modeling incompatibility relationships: for example, engines can't be
installed on the back of the fuselage (vs on the wings) if a normal tail (vs T-tail) is selected. Note: this feature
is only available if ConfigSpace has been installed: `pip install smt[cs]`

The hierarchy relationships are specified after instantiating the design space:


Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ numba # JIT compiler
matplotlib # used in examples and tests
pytest # tests runner
pytest-xdist # allows running parallel testing with pytest -n <num_workers>
black # check code format
black # check code format
ConfigSpace~=0.6.1
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@
"numba": [ # pip install smt[numba]
"numba~=0.56.4",
],
"cs": [ # pip install smt[cs]
"ConfigSpace~=0.6.1",
],
},
python_requires=">=3.7",
zip_safe=False,
Expand Down
4 changes: 2 additions & 2 deletions smt/applications/tests/test_ego.py
Original file line number Diff line number Diff line change
Expand Up @@ -997,8 +997,8 @@ def f_obj(X):
n_start=15,
)
x_opt, y_opt, dnk, x_data, y_data = ego.optimize(fun=f_obj)
self.assertAlmostEqual(np.sum(y_data), 2.03831406306514, delta=1e-4)
self.assertAlmostEqual(np.sum(x_data), 33.56885202767958, delta=1e-4)
self.assertAlmostEqual(np.sum(y_data), 2.7639515433083854, delta=1e-4)
self.assertAlmostEqual(np.sum(x_data), 32.11001423996299, delta=1e-4)

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

0 comments on commit 37e80b2

Please sign in to comment.