In[]:=
AbsoluteTiming[fit1=FindArgMax[logLMaxEnt[{b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12}],{b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12}]]logLMaxEnt[fit1]
Out[]=
{51.3487,{13.6935,4.67788,10.1793,2.07971,3.79014,0.610149,-9.27268,7.36686,-16.5477,-1.47299×,-0.0884319,0.0565588}}
-9
10
Out[]=
-4.24554
In[]:=
AbsoluteTiming[fit2=FindArgMax[logLMaxEnt[{b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12}],Map[{#,0.}&,{b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12}]]]logLMaxEnt[fit2]
Out[]=
{51.3248,{13.9038,4.48082,10.0695,1.93063,4.06205,0.640889,-9.39664,7.57436,-16.6462,-0.0000264885,-0.543447,-0.0000633662}}
Out[]=
-4.24506
In[]:=
AbsoluteTiming[fit3=FindMaximum[logLMaxEnt[{b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12}],Map[{#,0.}&,{b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12}]]]logLMaxEnt[{b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12}/.fit3[[2]]]
Out[]=
{51.8948,{-4.24506,{b113.9038,b24.48082,b310.0695,b41.93063,b54.06205,b60.640889,b7-9.39664,b87.57436,b9-16.6462,b10-0.0000264885,b11-0.543447,b12-0.0000633662}}}
Out[]=
-4.24506
In[]:=
AbsoluteTiming[fit3=FindMaximum[logLMaxEnt[{b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12}],Map[{#,0.}&,{b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12}],MaxIterations->1000,WorkingPrecision->30]]logLMaxEnt[{b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12}/.fit3[[2]]]
Out[]=
{1530.67,{-4.24524745334333373296280962493,{b113.6831907756218481181027075031,b24.65590354662002303451794138978,b310.0879783205183638351832504988,b41.93323427379232479887896323646,b53.63394456076766723140632256014,b60.611755274827679947723205814967,b7-9.24695829459213687542803263497,b87.45211223655986370599374515417,b9-16.6934826099261872069592027175,b10-7.32351649844790064252454589621×,b11-0.00227446315489844163034325477145,b12-0.000204630869941567603311157293870}}}
-16
10
Out[]=
-4.24525
In[]:=
AbsoluteTiming[fit4=FindMaximum[logLMaxEnt[{b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12}],Map[{#,0.}&,{b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12}],Method"ConjugateGradient"]]logLMaxEnt[{b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12}/.fit4[[2]]]
Out[]=
{26.6008,{-4.25461,{b18.81841,b25.0502,b37.32064,b42.81345,b53.79776,b61.19598,b7-5.33916,b87.55865,b9-11.2098,b10-0.653103,b11-0.126913,b12-1.5804×}}}
-12
10
Out[]=
-4.25461
In[]:=
AbsoluteTiming[fit5=FindMaximum[logLMaxEnt[{b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12}],Map[{#,0.}&,{b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12}],Method"PrincipalAxis"]]logLMaxEnt[{b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12}/.fit5[[2]]]
Out[]=
{26.9411,{-4.24592,{b114.7715,b27.91974,b310.4186,b42.09374,b53.97169,b60.512699,b7-10.0961,b85.258,b9-16.8308,b105.17937×,b11-0.235283,b12-1.54613×}}}
-10
10
-8
10
Out[]=
-4.24592
Conclusions
Conclusions
From what I tried, FindArgMax and FindMaximum with default settings are equal joint winners (they are clearly using the same algorithm).
Oddly, FindMaximum with precision and iterations turned up finds a sightly less good optimum. It also complains about some precision-busting step within the function, which I don’t fully understand. I’m guessing I need to specify the precision of all the numerical inputs (in the Data section) to match.
Questions
Questions
I would love to do this specifying the parameters as a vector represented by a single symbol (rather than a list of symbols). Lots of places in the documentation talk about this being an option, and there are a few examples, but I can’t get it to work here.
This is obviously a difficult function to optimize in that there is quite a bit of variation in some of the parameter estimates. Are there any methods that will likely work better? Some new industrial-strength option such as those in ConvexOptimization, etc.
