Hello All,
I just started to use AlgLib 3.6.0 in C++ incarnation, so I may be missing something simple. Can you, please, help me with this problem:
I am trying to use function minlbfgs to find a minimum given the user defined function callback which returns a func and grad's. The way how I sue it:
real_1d_array x; x.setcontent(initTheta.size(),initTheta.memptr()); //All zeros
minlbfgscreate(1, x, state); minlbfgssetcond(state, 0, 0, 0, m_nIterrations); alglib::minlbfgsoptimize(state, fnCostLogReg,0,this); minlbfgsresults(state, x, rep);
I noticed(in debugger) that on the second iteration the real_1d_array &x parameter in the call back function has got changed values for the next iteration. But these values are too large. I compare them with the same code I have in Octave and they are exactly 10 times bigger. This break my convergence. I am not sure how this algorithm works internally, but if I use an analogy with standard gradient descend method, then I have a feeling that there should be some parameter(lambda) that regulates the step of descend. Is there something I forgot to set up in minlbfgsoptimize?
Thanks a lot, Sergey Andreyev
|