FunctionOptimizer - it is a matlab application for the optimization of functions with a help of 4 predefined algorithms such as Gradient Descent, Newton's Method( multidimensional ), Nelder Mead, and Simulated Annealing.
Before starting to use this application, one should know certain properties of those algorithms. Why? Because without understanding them, the results might be unsatisfactory.
Gradient Descent and Newton's Method are gradient-based algorithms, which means they can only be applied to smooth functions like:
But won't work for this one:
While Nelder Mead and Simulated Annealing are free from this limitation and therefore can be applied to all types of functions due to their heuristic nature. Another great thing about them is that they can escape from a local minimum, but at the same time it is a disadvantage because by escaping from the better situation they might end up in a worse one. Although it is not the case for Gradient Descent and Newton's Method, where every step is an improvement.
Algorithms can go looking for a minimum outside of the plotted graph and it doesn't look good. There are two possible solutions:
- try to decrease 'StepSize' parameter or
- turn on 'fast plotting mode', since this mode plot the graph around the optimization results.
Matlab R2019a and above.
And maybe on older versions too, but I didn't test it.
Boost Software License( Version 1.0 )