12
$\begingroup$

I use

NMinimize[someFunction, Method -> {"RandomSearch", Method ->{"InteriorPoint"},"SearchPoints" -> 2n, "RandomSeed" -> RandomInteger[{0, 100}], "PostProcess" -> {FindMinimum, Method -> "QuasiNewton"}}, MaxIterations -> 1000 n, PrecisionGoal -> 10, AccuracyGoal -> 10]`

where someFunction is a function of n variables.

How could I measure the time complexity of this method?

$\endgroup$
1
  • 4
    $\begingroup$ all you can do without acess to the details of the code is emperically evaluate for various n using timing and look at the trend $\endgroup$
    – george2079
    Aug 12, 2014 at 15:14

1 Answer 1

15
$\begingroup$

There is a nice function BenchmarkPlot

enter image description here

The usage is something like this

Needs["GeneralUtilities`"]
BenchmarkPlot[{f1,f2}, # &, PowerRange[1, 1000], "IncludeFits" -> True]

Typical output:

enter image description here

There are already many examples on MMA.SE.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.