gpufit / Gpufit

GPU-accelerated Levenberg-Marquardt curve fitting in CUDA
MIT License
310 stars 91 forks source link

If fit goes wrong convergence test can report positively although fit didn't converge #15

Open jkfindeisen opened 7 years ago

jkfindeisen commented 7 years ago

If for some reason the first step is too large (too large lambda?), the parameters are way off after the first iteration and then never recover, but still chi_square-previous_chi_square will be zero sometimes and the convergence test will be positive although the model and the parameters are far from anything good.

Not sure yet, what exactly is wrong there and how to fix it but it surely deserves to be looked at.

This may also happen in other fit frameworks, but maybe not to the same extent. The value of the initial lambda parameter as well as a more complex analysis of the converged state may improve the situation

superchromix commented 6 years ago

@jkfindeisen Please post an example code which reproduces the problem.