Skip to content

Commit

Permalink
INT type in mixed integer models is now about ordered variables (SMTo…
Browse files Browse the repository at this point in the history
…rg#326)

* test_ego to check- WIP for PR"
"

* finishing PR

* fixing issue for warning with bad polynomial model in kriging based surrogates with mixed int

* add numpy int

* fix type issue

* black

* add ORD intead of INT

* add int test

* update test

Co-authored-by: Rémi Lafage <[email protected]>
  • Loading branch information
Paul-Saves and relf authored Aug 18, 2021
1 parent 903e4dd commit efbb5c7
Show file tree
Hide file tree
Showing 14 changed files with 322 additions and 83 deletions.
15 changes: 7 additions & 8 deletions doc/_src_docs/applications/ego.rst

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

Binary file modified doc/_src_docs/applications/ego_TestEGO_run_ego_example.png
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 17 additions & 18 deletions doc/_src_docs/applications/mixed_integer.rst

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

9 changes: 4 additions & 5 deletions doc/_src_docs/applications/mixed_integer.rstx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ Mixed-Integer Sampling and Surrogate (Continuous Relaxation)
============================================================

SMT provides the ``mixed_integer`` module to adapt existing surrogates to deal with
categorical (or enumerate) and integer variables using continuous relaxation.

For integer variables, values are rounded to the closer integer.
categorical (or enumerate) and ordered variables using continuous relaxation.
For ordered variables, the values are rounded to the nearest values from a provided list. If, instead, bounds are provided, the list will consist of all integers between those bounds.
For enum variables, as many x features as enumerated levels are created with [0, 1] bounds
and the max of these feature float values will correspond to the choice of one the enum value.

Expand All @@ -17,15 +16,15 @@ let say x1, will give "red" as the value for the original categorical feature.
The user specifies x feature types through a list of types to be either:

- ``FLOAT``: a continuous feature,
- ``INT``: an integer valued feature,
- ``ORD``: an ordered valued feature,
- or a tuple ``(ENUM, n)`` where n is the number of levels of the catagorical feature (i.e. an enumerate with n values)

In the case of mixed integer sampling, bounds of each x feature have to be adapted
to take into account feature types. While FLOAT and INT feature still have an interval
[lower bound, upper bound], the ENUM features bounds is defined by giving the enumeration/list
of possible values (levels).

For instance, if we have the following ``xtypes``: ``[FLOAT, INT, (ENUM, 2), (ENUM, 3)]``,
For instance, if we have the following ``xtypes``: ``[FLOAT, ORD, (ENUM, 2), (ENUM, 3)]``,
a compatible ``xlimits`` could be ``[[0., 4], [-10, 10], ["blue", "red"], ["short", "medium", "long"]]``


Expand Down
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.
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.
Loading

0 comments on commit efbb5c7

Please sign in to comment.