octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GSoC 2015: Optimization Package: Non-linear and constrained least sq


From: Julien Bect
Subject: Re: GSoC 2015: Optimization Package: Non-linear and constrained least squares lsqcurvefit, lsqlin, lsqnonlin
Date: Wed, 25 Feb 2015 10:58:55 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

Le 25/02/2015 10:19, Olaf Till a écrit :
On Tue, Feb 24, 2015 at 10:28:57PM +0000, Nir Krakauer wrote:
Olaf,

Mostly on general principles -- Octave aims to run code written for Matlab,
and optimization is a capability used across many application areas. If the
underlying routines are already there, it could be just a matter of
providing wrappers.
In optimization (and maybe also in other fields, e.g. numeric solving
of differential equations) it is practically impossible always to
produce the same results as Matlab. Even if Matlab provides references
for its applied optimization algorithms, the details of the
algorithm-implementations have impact on the results and are too
individual to be reproduced without using their code.

So making the interface identical to Matlabs interface would only
yield a superficial similarity. In particular there will probably
always be certain optimization problems which Matlabs optimization
algorithms can solve well enough, but the "respective" Octave
algorithms can't (and vice versa, of course).

In fact I'd think that people earnestly involved with optimization are
aware of this. They probably also are aware of the potential problems
of optimization and are prepared to spend some effort coping with
them. Compared to this effort, the effort of getting familiar with an
interface slightly different to Matlabs is minor. Correspondingly,
AFAICR we never had a complaint at the mailing lists that the
optimization interface is not identical to Matlabs from people seeking
help with an actual optimization problem.

OTOH, people unaware of the potential difficulties in optimization may
be tempted to expect that an interface identical to Matlabs should
produce exactly the same result as in Matlab.

Taken together I'd think that in optimization, since we have a
slightly different interface which (hopefully) offers some advantages,
it's reasonable to expect users to use it instead of Matlabs.

To address the issue of visibility by former Matlab users, we could
have e.g. an lsqcurvefit function which just throws an error with a
text informing the user about the existence of our interfaces.

Olaf

Olaf,

I mostly agree with everything you said and yet I believe that even some superficial similarity would be a valuable step forward.

I say this both as a developer of a toolbox/package [1, 2] that strives to remain compatible with both Octave (>=3.2.2, currently) and Matlab (>= R2007a, currently) and as someone who has seen several times how details of this kind (for instance, octave not having a function named fmincon, compatible with Matlab's one), when they accumulate (and they do), are able to prevent people from adopting Octave.

Take for instance fmincon. I am perfectly aware that it is not possible to get a 100%-similar implementation of this function, which is actually an umbrella over several types of complicated algorithms (sqp, active-set, interior-point), even with Matlab's documentation and all the textbooks and research papers in the world. Yet, I think that having a similar umbrella in Octave, with the same name, a compatible syntax and set of options, would be very useful. For instance, when fmincon is called with "Algorithm" set to "sqp", perhaps should we fall back on the sqp function as an optimizer. In other cases, if no solver of the same type is available, a warning could be issued that Octave's fmincon will switch to a different type of optimizer.

I don't think that we would get that many complaints about Octave's fmincon returning results different from Matlab's fmincon. A simple disclaimer in the description of the "Algorithm" option would probably be enough to answer these anyway.

Hope this helps,

Julien.


[1] http://octave.sourceforge.net/stk/index.html

[2] http://sourceforge.net/projects/kriging/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]