[NF] Implementation of bayesian optimisation
Closed this issue · 2 comments
The NSGA-II algorithm is already implemented in tuto_Optimization.ipynb
and will serve as a reference for further developments in the implementation of a Bayesian optimization algorithm for the design of electric motors. The implementation will be based on existing python libraries as:
- https://smt.readthedocs.io/en/latest/_src_docs/applications/ego.html
- https://gpflowopt.readthedocs.io/en/latest/notebooks/constrained_bo.html
- https://secondmind-labs.github.io/trieste/notebooks/inequality_constraints.html
In particular, some parameters in the design of the machines are discrete (example: the number of notches in the stator). The first SMT library allows to perform optimizations with mixed variables (continuous AND discrete) but without constraints (for example, "optimize for a number of notches between 10 and 24"). In the current state of knowledge, it is envisaged to use one of the two other packages in a complementary way in order to remove this obstacle.
Thus, the 3 main objectives are:
- To realize a Bayesian optimization algorithm without constraints on continuous variables.
- Add the constraints to the previous algorithm.
- Add discrete variables.
[UPDATE 1 - Mono-objective optimization via SMT]
This implementation of Bayesian Optimisation has been divided into four new steps:
- Mono-objective optimisation : bayesian optimisation with SMT seems to be restricted to mono-objective optimisation
- Multi-objective optimisation
- Introduction of discrete variables
- Introduction of constraints
For now, the first step has been implemented. The SMT library has been included in Pyleecan and tested on both zdt3 and Binh&Korn when reduced to a mono-objective problem.
You may keep track of the work in the following repo, forked from the base Pyleecan repo: https://github.com/nnassar98/pyleecan.
We are currently working to include multi-objective optimisation. One idea is to reproduce the work on this repo: https://github.com/RobinGRAPIN/smoot.
In order to implement multi-objective bayesian optimisation via SMT, the optimisation is divided into 2 steps:
- Estimation of the objective function by SMT. Bayesian statistics are expected to predict the model with a low number of simulations.
- Genetic optimisation on the predicted model: no more simulations need to be run.
We expect a decrease in computational cost by using this method.