help-octave
[Top][All Lists]
Advanced

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

RE : Re: refining log to ]0; +Inf[


From: gro gro
Subject: RE : Re: refining log to ]0; +Inf[
Date: Thu, 2 Aug 2007 11:11:14 +0200 (CEST)

Well, thanks for the tip!

Have a nice day,
Regards,

Giansolo


Przemek Klosowski <address@hidden> a écrit :

I'm currently running into trouble using leasqr function. In fact i'm making a non linear regression on the p vector using the function :
y = (1/p(2))*(log((x-p(3))/EQF) - p(1));

as p(3) varies trought the leasqr algorithm and may produce negative values (x-p(3)<0), i may recover complex values.

Well, when the argument of the log() is near zero, the function is
obviously very sensitive to the value of p(3), and introducing large
discontinuities will throw off the convergence.

It'll probably be better if you simply limited the range of p(3) to
the range which guarantees that your objective function y is
well-defined for all values of your x

p(3) < min(x)

One way to do that is by variable substitution p(3) -> Xmin-exp(p(3)),
so that you'll fit:

y = (1/p(2))*(log(((x-Xmin)+exp(p(3)))/EQF) - p(1));

your original p(3) can be then calculated from the fitted value.


Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail
reply via email to

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