# Make NMinimize use a variant of Differential Evolution for Optimization?

Posted 2 years ago
3077 Views
|
5 Replies
|
6 Total Likes
|
 Dear AllI know that NMinimize has the option of using Differential Evolution for Optimization. I want to self code variants of Differential Evolution and check how they compare in performance to the original Differential Evolution for Optimization purposes. Differential Evolution has many variants like jSO, lShade etc...https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0222103Plus since I am a Phd student, as part of my research I am exploring how I can make my own variant of Differential Evolution and use Mathematica to compare it's performance.I am currently not able to figure out how to go about coding a variant of DE and using Mathematica to compare it's performance to the original DE.Thanks in advance for all the help. Best Regards Garuav
5 Replies
Sort By:
Posted 2 years ago
 (in continuation of my question)NMinimize[{100 (y - x^2)^2 + (1 - x^2), x^2 + y^2 <= 1}, {x, y}, Method -> "DifferentialEvolution"]is the command to do optimization using Differential Evolution in Mathematica... Is it possible access the source code of DifferentialEvolution and then make changes and then create a new notebook called DEvariation.nbso that I can use the variation of Differential Evolution to do Optimization: Like as in:NMinimize[{100 (y - x^2)^2 + (1 - x^2), x^2 + y^2 <= 1}, {x, y}, Method -> "DEvariation"]would that work?Thanks & Regards Gaurav
Posted 2 years ago
 Gaurav,Did you consult the detail settings for the differential evolution algorithm? They can be found here --about half way down the documentIn general, you can't see the source code for internal algorithms so you would have to program your own version. However, in many cases Mathematica will rely on third party open source algorithms so I would contact Wolfram Tech support to see if their Differential Evolution algorithm is publicly available.Regards,Neil
Posted 2 years ago
 It is not library code. It can be spelunked perhaps, since it is implemented in the Wolfram Language.--- edit ---I did find a bit more information. Here are the links I was able to locate. One at least involves similar to what you want but with the Nelder-Mead method.https://mathematica.stackexchange.com/a/114826/51https://mathematica.stackexchange.com/questions/27827/minimization-by-nelder-meadhttps://mathematica.stackexchange.com/questions/4700/shaving-the-last-50-ms-off-nminimize/4877#4877https://mathematica.stackexchange.com/questions/2309/problem-with-nonlinearmodelfit/2327#2327