symfit icon indicating copy to clipboard operation
symfit copied to clipboard

Max iteration keyword differs for different fit objects

Open tBuLi opened this issue 8 years ago • 0 comments

~~When calling the new smart Fit object, the name of the maximum iteration keyword passed to scipy has to be different for NumericalLeastSquares and ConstrainedNumericalLeastSquares. That shouldn't be the case of course.~~

~~All common keywords should therefore be wrapped. Since this package aims for readability, I propose to use clear and descriptive names such as max_iterations rather than copy the obscure scipy ones.~~

Update: although the short term problem had been solved, we still have the issue that the different minimizers in scipy.optimize.minimize have different keywords for the same functions. We should therefore come up with some human readable names such as max_iterations, and then have a dictionary for how this translates to the correct keyword for the relevant minimizer.

An example usage would be

fit = Fit(...)
fit.execute(max_iterations=1000)

Inside execute this should then be translated into maxiter=1000 for NelderMead, option={'maxiter': 1000} for SLSQP, etc., as per the documentation here.

tBuLi avatar Dec 15 '16 13:12 tBuLi