LsqFit.jl icon indicating copy to clipboard operation
LsqFit.jl copied to clipboard

Improve stderror information in case of non-convergence or singular covar

Open pkofod opened this issue 6 years ago • 3 comments

pkofod avatar Jan 02 '20 13:01 pkofod

Will this be worked on any time soon? I believe my problem is related to this (data is bad, fit supposedly succeeds but estimate_covar throws a LAPACK exception at Rinv = inv(R)), and there seems to be no way around it.

I don't know how I might go about fixing this. I don't know the theory. I guess I should check if R is invertible first, but I don't know why it might not be and what to do in that case. Make Rinv = null matrix when det(R) == 0? Or fill it with infinities so that stderror returns Inf? Or throw a specific error when the covar matrix is not invertible?

(Then again, I am plagued with other LAPACK errors for when I try to fit to bad data... There should be some way of validating the fit other than catching LAPACK exceptions...?)

ixjf avatar Mar 19 '21 19:03 ixjf

Are you able to share your example?

pkofod avatar Mar 20 '21 12:03 pkofod

I'll try to get a working example this week. For now, I've just been catching LAPACK exceptions to be able to finish my work in time.

ixjf avatar Mar 22 '21 14:03 ixjf