some users comments (disclaimer: only used leasqr, not nmsmax or
samin):

On Mon, Aug 03, 2009 at 11:25:57AM +0200, Søren Hauberg wrote:
> man, 03 08 2009 kl. 00:34 -0700, skrev roessli bertrand:
> > In the optim package:
> > -----------------------------------
> > Mufit uses nmsmax, leasqr and samin.cc and I modified these functions
> > sligthly 
> > to fit my needs; 
> > -As far as I understand the code, both nmsmax and samin.cc do not
> > allow to keep (some) parameters 'fixed' when fitting and then to
> > release them. For example, the starting temperature in samin.cc
> > diverges if the lower and upper bounds = start parameter values. 

Think it _is_ general purpose. Though one could simply leave these
parameters out, this is not always convenient. Having an option to
keep some parameters 'fixed' is surely desirable. (leasqr has such an
option, but IMO it could be a bit more direct, i.e. an index of
parameters which are to be fixed).

> > -Also in nsmax and leasqr I modified the way the cost functioni is
> > called such as it is possible to keep the parameters within
> > 'bounds'. 

I don't know if there are theoretical objections against bounds in
Levenberg-Marquardt optimization, but I also ended up introducing
bounds into leasqr for my use; I would think this is general
purpose. I would favor not to simply reset a parameter to its bound,
but to preserve the direction of the attempted step. Also there is the
question if only bounds or also linear constraints should be
introduced. But I would not know how to implement a possibility for
more than _one_ linear constraint. Maybe there is some theory
available for that ...

> > -I added a varargin variable to leasqr.m to allow pass additional
> > parameters. 

This should be unnecessary since one can use anonymous functions for
passing additional parameters to the user function. Also, no
additional arguments to leasqr could then be introduced in the future
without possibly breaking existing code.

> > 
> > These are small changes, but the program will not run with the
> > functions in 
> > the optim-package as it is. 
> 
> The changes you have made are they general purpose?
> 
> I would love to hear from some users/developers of the 'optim' package
> on this issue.
> 
> Søren

For leasqr, it is probably worth making some changes to the original
first (a new last argument for bounds) and so eliminating the need to
duplicate code.

Regards, Olaf

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to