Skip to content

Commit

Permalink
Update the documentation (SMTorg#669)
Browse files Browse the repository at this point in the history
* fix smt-dse

* ruff

* fix import

* fix imports and doc

* Update notebook references

Signed-off-by: Emmanuel Ferdman <[email protected]>

* fix notebooks by emmanuel ferdman

* fix link

---------

Signed-off-by: Emmanuel Ferdman <[email protected]>
Co-authored-by: Emmanuel Ferdman <[email protected]>
  • Loading branch information
Paul-Saves and emmanuel-ferdman authored Oct 30, 2024
1 parent 80c5434 commit 0639940
Show file tree
Hide file tree
Showing 20 changed files with 86 additions and 492 deletions.
67 changes: 49 additions & 18 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.

11 changes: 6 additions & 5 deletions doc/_src_docs/applications/Mixed_Hier_usage.rstx
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,16 @@ The design space is then defined from a list of design variables and implements
Hierarchical variables
----------------------

The design space definition uses the framework of Audet et al. [2]_ to manage both mixed-discrete variables and
The design space definition uses the framework of [2]_ to manage both mixed-discrete variables and
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 or for a continuous variable to be greater than another.
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]`
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 smt_design_space_ext has been installed: `pip install smt-design-space-ext`

The hierarchy relationships are specified after instantiating the design space:

Expand Down Expand Up @@ -103,6 +104,6 @@ Example of mixed integer context usage
References
----------

.. [1] Saves, P. and Diouane, Y. and Bartoli, N. and Lefebvre, T. and Morlier, J. (2022). A general square exponential kernel to handle mixed-categorical variables for Gaussian process. AIAA Aviation 2022 Forum.
.. [1] Saves, P. and Lafage, R. and Bartoli, N. and Diouane, Y. and Bussemaker, J. and Lefebvre, T. and Hwang, J. and Morlier, J. and Martins, J. (2024). SMT 2.0: A Surrogate Modeling Toolbox with a focus on Hierarchical and Mixed Variables Gaussian Processes. Advances in Engineering Sofware.

.. [2] Audet, C., Hallé-Hannan, E. and Le Digabel, S. A General Mathematical Framework for Constrained Mixed-variable Blackbox Optimization Problems with Meta and Categorical Variables. Oper. Res. Forum 4, 12 (2023).
.. [2] Hallé-Hannan, E. and Audet, C., and Diouane, Y. and Le Digabel, S. and Saves, P. (2024). A graph-structured distance for heterogeneous datasets with meta variable, Neurocomputing.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions doc/_src_docs/getting_started.rst

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

6 changes: 3 additions & 3 deletions doc/_src_docs/getting_started.rstx
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ Notebooks
Several notebooks are available to get up to speed with SMT:

* `General <https://github.com/SMTorg/smt/blob/master/tutorial/SMT_Tutorial.ipynb>`_
* `Handling of Noise <https://github.com/SMTorg/smt/blob/master/tutorial/SMT_Noise.ipynb>`_
* `Handling of Mixed Integer variables <https://github.com/SMTorg/smt/blob/master/tutorial/SMT_MixedInteger_Engineering_applications.ipynb>`_
* `Efficient Global Optimization application <https://github.com/SMTorg/smt/blob/master/tutorial/SMT_EGO_application.ipynb>`_
* `Handling of Noise <https://github.com/SMTorg/smt/blob/master/tutorial/Misc/SMT_Noise.ipynb>`_
* `Handling of Mixed Integer variables <https://github.com/SMTorg/smt/blob/master/tutorial/MixedInteger/SMT_MixedInteger_Engineering_applications.ipynb>`_
* `Efficient Global Optimization application <https://github.com/SMTorg/smt/blob/master/tutorial/SBO/SMT_EGO_application.ipynb>`_

Uninstalling
------------
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
"smt.sampling_methods",
"smt.utils",
"smt.applications",
"smt.applications.tests",
"smt.design_space",
"smt.kernels",
],
Expand Down
2 changes: 2 additions & 0 deletions smt/applications/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from .vfm import VFM
from .podi import PODI, SubspacesInterpolation
from .cckrg import CoopCompKRG
from .tests.test_mixed_integer import TestMixedInteger

__all__ = [
"VFM",
Expand All @@ -20,4 +21,5 @@
"PODI",
"SubspacesInterpolation",
"CoopCompKRG",
"TestMixedInteger",
]
5 changes: 5 additions & 0 deletions smt/applications/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from .test_mixed_integer import TestMixedInteger

__all__ = [
"TestMixedInteger",
]
4 changes: 2 additions & 2 deletions smt/applications/tests/test_mixed_integer.py
Original file line number Diff line number Diff line change
Expand Up @@ -801,13 +801,13 @@ def run_hierarchical_design_space_example(self):
from smt.surrogate_models import KRG, MixHrcKernelType, MixIntKernelType
from smt.design_space import (
CategoricalVariable,
DesignSpace,
FloatVariable,
IntegerVariable,
OrdinalVariable,
)
from smt_design_space_ext import ConfigSpaceDesignSpaceImpl

ds = DesignSpace(
ds = ConfigSpaceDesignSpaceImpl(
[
CategoricalVariable(
["A", "B"]
Expand Down
2 changes: 1 addition & 1 deletion smt/design_space/design_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ def __repr__(self):

def raise_config_space():
raise RuntimeError(
"Dependencies are not installed, please install smt_design_space."
"Dependencies are not installed, please install smt_design_space_ext."
)


Expand Down
2 changes: 1 addition & 1 deletion tutorial/MFK/SMT_MFK_Noise.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"<a href=\"https://colab.research.google.com/github/SMTorg/smt/blob/master/tutorial/SMT_MFK_Noise.ipynb\" target=\"_blank\" rel=\"nofollow\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"></a>"
"<a href=\"https://colab.research.google.com/github/SMTorg/smt/blob/master/tutorial/MFK/SMT_MFK_Noise.ipynb\" target=\"_blank\" rel=\"nofollow\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"></a>"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion tutorial/Misc/SMT_GP_Sampling.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"metadata": {},
"source": [
"\n",
"<a href=\"https://colab.research.google.com/github/SMTorg/smt/blob/master/tutorial/SMT_GP_Sampling.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>\n"
"<a href=\"https://colab.research.google.com/github/SMTorg/smt/blob/master/tutorial/Misc/SMT_GP_Sampling.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>\n"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion tutorial/Misc/SMT_Noise.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"source": [
"\n",
"<a href=\"https://colab.research.google.com/github/SMTorg/smt/blob/master/tutorial/SMT_Noise.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
"<a href=\"https://colab.research.google.com/github/SMTorg/smt/blob/master/tutorial/Misc/SMT_Noise.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
Expand Down
Loading

0 comments on commit 0639940

Please sign in to comment.