Occasionally when I want to fit a probability distribution to actual data I get the message "Scipy curve_fit Runtime Error:Optimal parameters not found: Number of calls to function has reached maxfev = 1000". The program halts and I get an error message. Is there a way to capture this status before the program halts? If I can read that maxfev number of iterations have occurred I want the program to try a simpler function to fit, a function although not the best choice but will work for sure. Can anyone give me advice on this?
Asked
Active
Viewed 159 times
0
-
Does this answer your question?https://stackoverflow.com/questions/15831763/scipy-curvefit-runtimeerroroptimal-parameters-not-found-number-of-calls-to-fun – Rajat Mishra Apr 26 '20 at 00:34
-
4What about a simple `try...except`? – Patol75 Apr 26 '20 at 01:11