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?
Answer
There is a nice function BenchmarkPlot
The usage is something like this
Needs["GeneralUtilities`"]
BenchmarkPlot[{f1,f2}, # &, PowerRange[1, 1000], "IncludeFits" -> True]
Typical output:
There are already many examples on MMA.SE.
Comments
Post a Comment