DEAP / deap

Distributed Evolutionary Algorithms in Python
http://deap.readthedocs.org/
GNU Lesser General Public License v3.0
5.79k stars 1.12k forks source link

How to use GA to find optimal set of solutions for multi-objective functions #743

Open Fa20 opened 6 months ago

Fa20 commented 6 months ago

Hello,

I have dataset with 20 observations(9 input which represent the values of the parameters and 3 outcomes which represent the values of the objective functions). I do not have the objective functions in mathematical form . can we use Deap and 20 observations to find the set of parameters that minmize/maximize objective functions

fengyangsun commented 6 months ago

Such kind of task is usually hard to be solved solely by a conventional optimization algorithm like GA. It usually needs to also work with some machine learning strategies such as surrogate model, which is not yet included in deap.

Fa20 commented 6 months ago

@fengyangsun do you mean to use ML to perdict the outcome and then used in Deap? . if the accuracy of the model is not good this will lead to bad result. I want to use GA in Deap to give suggestion for set of paramters then apply simulations and calaculate the outcome for this set of parametrs. my question can we do this? how should looks like Fitness functions in this case ?

fmder commented 6 months ago

It will be hard with a budget of only 20. GAs usually work better with budget of hundreds to thousands. You can still try it, i'd go for something like a 1+1 Evolution Strategy.

Fa20 commented 6 months ago

@fmder do you think that can be used with just observations without the mathematical form of the objective functions? how can we create in this case the fitness or how should looks like in case that we have onservations ?

fengyangsun commented 6 months ago

@fengyangsun do you mean to use ML to perdict the outcome and then used in Deap? . if the accuracy of the model is not good this will lead to bad result. I want to use GA in Deap to give suggestion for set of paramters then apply simulations and calaculate the outcome for this set of parametrs. my question can we do this? how should looks like Fitness functions in this case ?

It's a bit different. Firstly, if you really wanna use surrogate with optimizer such as GA/ES, you got to have at least an explicit fitness function in your code, which is needed in GA and surrogate model, instead of only a dataset of observations and response values, which can satisfy surrogate model somehow. But you seemly don't have such fitness function. which makes things tricky.

If in the latter case without f, you can also build an ml model with the 20 data samples, and search the optima based on the built model. The problem is, you can never validate the found optima is true optima or not, coz you don't have access to real fitness function. Of course, if the model is very accurate, you can still assume the found optima on the model is close to the true optima. But like you said, we cannot ensure the training accuracy sometimes. That's why we need a real fitness function to correct the training results time to time. You mentioned simulation, so it sounds like a fitness function?

fmder commented 6 months ago

Ho no, for that you either need to build model out of you observations or query the underlying system.

Le dim. 17 mars 2024, 16 h 45, Fa_Ibra @.***> a écrit :

@fmder https://github.com/fmder do you think that can be used with just observations without the mathematical form of the objective functions? how can we create in this case the fitness or how should looks like in case that we have onservations ?

— Reply to this email directly, view it on GitHub https://github.com/DEAP/deap/issues/743#issuecomment-2002611674, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHKXQV5KVRJZU5WCGO6NFDYYX6GDAVCNFSM6AAAAABE2HVAKCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBSGYYTCNRXGQ . You are receiving this because you were mentioned.Message ID: @.***>