How to find max fuction with Genetic Algorithm
Mostra commenti meno recenti
Hi all,,
i know that doc 'ga' tell me about Find minimum of function using genetic algorithm. How to find max fuction using genetic algorithm?
thanks..
1 Commento
Adeline War
il 22 Feb 2023
Got any solution?
Risposta accettata
Più risposte (1)
Jan
il 30 Ott 2012
4 voti
While you find a lot of tools to minimize a function F, you find no functions to maximize F. Fortunately you can minimize G = -F, such that you do not need to program your own maximization tool.
7 Commenti
Andy Rahmawan
il 30 Ott 2012
Jan
il 30 Ott 2012
Perhaps I should not reveal this magic trick, but sell a maximization tool --the only you will find in the world!-- for a lot of money. ;-)
Jose Valles
il 7 Dic 2017
Hello Jan Simon,
Could you please expand more your answer relate to finding the max value of a function using GA?
I have seen a lot answers that mention this procedure but I do not clearly understand how.
Maybe a simple example would be great
Thank you!
Regards
Peter Mwangi
il 18 Feb 2018
Jose Valles, just include a (-) negative sign in front of your function in the objective function code
MARIA JACKSON A
il 2 Nov 2020
Maximisation works well with that. But what happens to the best fitness value in that case sir. The best fitness Indicated in the graph is that correct corresponding to the optimisation.
tayyaba ilyas
il 11 Dic 2021
hello to all,
I am trying to solve an optimization problem to find maximum value of my fitness function that calculate rate. My fitness function for each individual return the value for 1/rate , as GA solver minimizes so I used 1/rate to maximize rate. once the GA solver executes and return the minimum value, then I used to take another inverse to get the actual maximized value for the rate. Is the procedure is correct? As also you people suggested to include a (-) negative sign in front of the function in the objective function code. i didnot understand the actuall way to do it. Shall i have to take negative of fun (-fun) when calling it in ga solver below?
suggest me how to perform maximizing optimization problem with GA solver.
Thanks in advance
Adeline War
il 17 Feb 2023
I have
f = fitnessfunction(h)
I tried placing a negative sign infront of the function but it did not work.
Categorie
Scopri di più su Genetic Algorithm in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!