How should I set up Fmincon to optimize parameters with different units ?

1 view (last 30 days)
As degrees and length units !
That's because in optimizing the step size of a parameter to be optimized is crucial to the correct operation of the optimization method.
I mean, different scales of steps must be determined for parameters with units of different measures.
How do I do this in Fmincon ?

Answers (2)

Matt J
Matt J on 23 Feb 2015
Edited: Matt J on 23 Feb 2015
Which step size are you referring to, the one used to update the unknown parameters in each iteration or the one used in finite difference derivative approximations?
If the former, most fmincon algorithms use Newton-like step directions which aren't as sensitive to the scaling of the parameters. So, if you are supplying your own gradient and Hessian calculation, you shouldn't have to worry too much.
For finite difference calculations, if you can calculate the Hessian of the objective function at some representative point , it could be helpful to tune the units so that cond(Hessian) is small. If it's too hard to compute the complete Hessian, you could try just computing its diagonal and approximating it as a diagonal matrix.

John D'Errico
John D'Errico on 23 Feb 2015
It is often not critical that you get the scaling perfect. Yes, it would be nice if the function to be evaluated had all parameters roughly 1, or at least all the same value. But a factor of 100 or so in either direction will not kill you. 8 or 12 or 15 powers of 10 will almost certainly hurt very badly.
Since you are the one who writes the objective function that fmincon will minimize, it is you who should do the scaling. I don't see it as being at all difficult though.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!