Hi!
I confirm the bug, and I think that I know the reason behind it (unable to test it at my work PC, already out of office, but I am pretty sure).
For stability reasons ALGLIB puts constraints on parameters being fitted and relaxes them several times. However, when logistic fitting functionality was developed it was thought that constraining B to be in [0.1,10] range is good enough option. It is exponent, after all - no one imagined that actual data will need an exponent equal to 30! So, relaxing this constraint should help to solve the problem.
You can do so yourself as follows (I do not give you line numbers because your trial is customized with license boilerplate, line numbers are different from that of the publicly available ALGLIB): 1) find a line with comment "Relax constraints, run optimization one more time" in the interpolation.cpp. It is the only such line in the file. 2) below this line find bndl.ptr.p_double[1] = 0.1; and replace 0.1 by 0.01 3) below this line find bndu.ptr.p_double[1] = 10.0; and replace 10.0 by 100.0
Does it help?
|