[SciPy-User] Least-squares fittings with bounds: why is scipy not up to the task?
Sat Mar 10 08:54:55 CST 2012
10.03.2012 15:01, Nathaniel Smith kirjoitti:
> Out of curiosity (and apropos an earlier thread), would it affect your
> reservations if lmfit's ad-hoc AST usage and python interpreter were
> replaced by a simple call to 'eval'?
As far as I see, the AST manipulation is used only to provide a
restricted dialect of Python. The main question then seems to be whether
there is a need to guard against malicious input (IMHO, not really). The
AST pieces seem to be more or less abstracted away, so this shouldn't
matter so much.
The bigger issue is that the interface provided by this package for
specifying constraints etc. is completely different from the unified
optimization interface that is currently in Scipy's Git.
Just dumping lmfit into Scipy would IMHO not be a good idea --- having
one interface for scalar minimizers, and then a completely different one
for least squares does not seem like a good idea. Code and ideas could
be reused, though, picking up the best parts of the two approaches that
are there now, and producing a better one.
More information about the SciPy-User