5

So I'm doing some benchmarking of a method for numerical optimization in Mathematica and I'm getting some inconsistent results when I use the Method->Automatic specification with FindMinimum. What I want to do is check what method it is choosing. I know I can use AbsoluteOptions[] to extract the choices from a some output, like a Graphics object, but this doesn't work with FindMinimum, ie

AbsoluteOptions[ Findminimum[ f[x], {x, 0.}, Method->Automatic ], Method ]

doesn't work. Can I do this?

Jason Hite
  • 611
  • 4
  • 9
  • 1
    `AbsoluteOptions` doesn't work like people wish it did. See: http://stackoverflow.com/questions/4288713/how-to-determine-plotrange-to-include-all-of-graphics as an example. – Mr.Wizard Jun 02 '11 at 15:51

1 Answers1

7

I don't think there is a general way to find what method is used by numerical functions, other than reading the documentation. The documentation on unconstrained optimization is pretty good, though. There it says:

With Method -> Automatic, Mathematica uses the "quasi-Newton" method unless the problem is structurally a sum of squares, in which case the Levenberg-Marquardt variant of the "Gauss-Newton" method is used. When given two starting conditions in each variable, the "principal axis" method is used.

Additionally, for constrained problems the interior point method is used. If the problem is linear (objective and constraints) linear programming will be used. (LP itself has, I think, three methods that are used, depending on size and other features.)

rcollyer
  • 10,475
  • 4
  • 48
  • 75
Mark McClure
  • 4,862
  • 21
  • 34
  • Thanks, I was wondering if I was just using AbsoluteOptions incorrectly, but I guess I just have to hunt through the documentation. – Jason Hite Jun 02 '11 at 15:51
  • @Jason `AbsoluteOptions` is meant to work with objects that have options; `Graphics` and `NotebookObject`s come to mind. In a command like the one you suggested, you are effectively passing the output of `FindMinimum` to `AbsoluteOptions`, so I would expect it to work. – Mark McClure Jun 02 '11 at 16:01
  • @Brett I happen to be sitting at my computer waiting for an email from Wolfram Research. :) – Mark McClure Jun 02 '11 at 16:02