Hi
I am getting an error code : “Function minimizer not making progress … is minimum attained?” at the beginning of iteration and stops without iteration. To solve this, I tried changed convergence_criteria and maximum_function_evaluations, but none of them worked.
Does anyone know how to solve this error?
If anyone wants to see the code and data, I am happy to send them.
Thanks
Toshihide "Hamachan" Hamazaki, 濱崎俊秀PhD
Alaska Department of Fish and Game: アラスカ州漁業野生動物課
Diivision of Commercial Fisheries: 商業漁業部
333 Raspberry Rd. Anchorage, AK 99518
Phone: (907)267-2158
Cell: (907)440-9934
Maybe you can write this up for the list. It is a good debugging exercise.
first one should check that the derivatives are OK. I got rid of upper
case names.
I hate them because they are treated inconsistently in various stuff.
./kusko -dd 0
brings up the derivative checker. entering 0 for all parameters and
1.e-6 for
the step size shows That the derivatives are wrong.
Your LL is the sum of a bunch of stuff. Easiest is to identify which part
leads to the incorrect LL. Here I use the first 5 parts.
change
//f = tf1+tf2+tf3+tf4+tf5+tf6+tf7+tf8;
to this
f = tf1+tf2+tf3+tf4+tf5;
quick check of the derivatives shows they are OK.
so problem is in this part
+tf6+tf7+tf8
change to
f = tf1+tf2+tf3+tf4+tf5+tf6+tf7;
play around a bit and you will find that tf6, 7, and 8 are all bad.
So there is an error in that part of the code.
Open the file in vi (your favourite text editor) or take a year off and
learn emacs.
and search for tf6. It only occurs in 3 places.
dvariable tf1,tf2,tf3,tf4,tf5,tf6,tf7,tf8;
tf6 += square(log(esc(Yr_tak(n)))-log(sltak*Obs_tak(n)))/wgt_Weir;
f = tf1+tf2+tf3+tf4+tf5+tf6+tf7+tf8;
et voila. You didn't initialize tf6-8.
Also the model is badly scaled. Pity they don't teach this stuff. Oh
well so long as your self esteem is high.
You should scale your effort to have an average of 1. Use log_q instead
of q as the independent variable and probably also for a bunch of other
parameters. As well. afew other things and I get
# Number of parameters = 39 Objective function value = 880.399 Maximum
gradient component = 1.49297e-05
# Tot_Run:
124828. 100000. 184083. 179048. 100000. 231722. 189527. 100000.
120630. 119154. 100000. 100000. 195827. 195979. 202405. 183813. 192496.
184842. 217128. 233187. 153358. 171826. 152269. 132511. 100000. 132118.
220728. 243343. 408677. 337317. 371276. 239961.
# slkwe:
11.2369674866
# sltul:
109.298494092
# slgeo:
27.3164217273
# slkog:
8.02980039814
# sltat:
71.2398264350
# sltak:
38.4125299977
# log_q:
-8.55912001718
thats a q of 0.00019178798954070217
~
You owe me $AUD 5K (real money these days) worth of single malt.