Mantis - ALGLIB
Viewing Issue Advanced Details
322 Optimization crash always 2010-04-01 16:07 2010-04-12 10:42
senyai  
SergeyB  
normal  
resolved 2.4.0  
fixed  
none    
none 2.5.0  
C++
0000322: FIXED: crash in lsfitnonlineariteration function
ap::ap_error when bad values specified in vector of parameters being fitted. When c(2) at line 40 is 1.5 all is ok, when it is 5.5 there is a crash.
Looks like this issue was fixed, but I'm not sure.
cpp file icon nonlinear_fit_test.cpp [^] (1,838 bytes) 2010-04-01 16:07
Issue History
2010-04-01 16:07 senyai New Issue
2010-04-01 16:07 senyai File Added: nonlinear_fit_test.cpp
2010-04-01 16:07 senyai Programming language => C++
2010-04-01 16:07 senyai Issue Monitored: senyai
2010-04-02 12:09 SergeyB Status new => assigned
2010-04-02 12:09 SergeyB Assigned To => SergeyB
2010-04-02 14:52 SergeyB Note Added: 0000046
2010-04-12 10:40 SergeyB Note Added: 0000047
2010-04-12 10:40 SergeyB Status assigned => resolved
2010-04-12 10:40 SergeyB Fixed in Version => [NOT RELEASED YET] Next release
2010-04-12 10:40 SergeyB Resolution open => fixed
2010-04-12 10:42 SergeyB Summary crash in lsfitnonlineariteration function => FIXED: crash in lsfitnonlineariteration function

Notes
(0000046)
SergeyB   
2010-04-02 14:52   
The error is caused by target function which has too wild gradient, which shoots algorithm too far from starting point, which in turn leads to overflow. More precisely, algorithm tries step about 1E24 in magnitude so it raises overflow on the second attempt to calculate target function.

The only way to solve this problem is let algorithm restrict its steps so it won't cause overflow in one step. It will be implemented in the upcoming release, which will feature new L-BFGS/Levenberg-Marquardt API and new optimization algorithms (CG and bound constrained CG).
(0000047)
SergeyB   
2010-04-12 10:40   
Fixed. Maximum step can be specified, so if your function have exponents inside which knocks current point too far, you can call SetStpMax() to guard algorithm steps.