commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles Sadowski <gil...@harfang.homelinux.org>
Subject Re: [math]
Date Fri, 06 Jul 2012 20:05:26 GMT
Hi.

If you are using the function

  a * Math.pow(t, b) * Math.exp(-c * t)

the gradient is:

  { Math.pow(t, b) * Math.exp(-c * t),
    a * Math.log(t) * Math.pow(t, b) * Math.exp(-c * t),
    -a * t  Math.pow(t, b) * Math.exp(-c * t) }

> // No idea what goes here. Nothing seems to work.

Well, the gradient (partial derivatives w.r.t the parameters) is the thing
that will work; the attached figure shows the data and the function that
fits it with
 a = 1.097378664278161
 b = 0.4273818336149512
 c = 0.01457006142420487

> 
> a, b and c for this example should be: A: 1.0782   B: 0.4583   C: 0.0166

The fit is slightly better with the values found by "CurveFitter"
(the "LevenbergMarquardt" algorithm actually).

Regards,
Gilles


Mime
View raw message