[Top][All Lists]

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

Re: lsqnonlin and nonlin_residmin

From: Olaf Till
Subject: Re: lsqnonlin and nonlin_residmin
Date: Sun, 7 Jun 2015 10:44:11 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Sat, Jun 06, 2015 at 06:44:20PM -0700, AsmaA wrote:
> Hi Olaf,
> Could you please review my code and give your comments on lsqnonlin and
> lsqcurvefit in [1] and [2]? 

Hi Asma,

before a thorough review, could you first implement the issue with the
user-supplied Jacobian? Or tell me if you need advise with that.

At a first glance, your code looks quite well, but a few remarks:

- Is there a reason for just discarding any imaginary parts in x0? I'd
  have thought since the functions only process real parameters, an
  error must be thrown if x0 is complex.

- If a final Jacobian is returned, it should be computed in the same
  way the algorithm computes its Jacobians, i.e. with __dfdp__.m as
  default, jacobs.m if the option 'complex_step_derivative_f' is set
  (which probably means 'never', since there is no equivalent option
  in Matlab (?)), or the Jacobian function which was supplied by the
  user, if any. The best way to achieve using the correct function for
  the Jacobian is probably to call 'residmin_stat' with suitable
  arguments; 'residmin_stat' is intended for this and similar things.

  Note that 'jacobs.m' can only be used if requested by the (informed)
  user, since the users model function is not necessarily usable for
  computing complex step derivatives.

> Is it convenient for you to review it this way?  

Yes, that is ok.

Regards, Olaf

PS: For some reason I get each e-mail twice from you. Just reply
directly to Octaves maintainers list, possibly with my address
included in CC.

> Kind Regards
> Asma.
> [1] https://github.com/AsmaAfzal/octave_workspace/blob/master/lsqnonlin.m
> [2] https://github.com/AsmaAfzal/octave_workspace/blob/master/lsqcurvefit.m

public key id EAFE0591, e.g. on x-hkp://pool.sks-keyservers.net

Attachment: signature.asc
Description: Digital signature

reply via email to

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