You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Thom Brown <th...@gmail.com> on 2015/09/07 12:07:36 UTC

[math] Usage of Marquardt Optimizer for an Equation

I've read both guides (
http://commons.apache.org/proper/commons-math/userguide/optimization.html
and
http://commons.apache.org/proper/commons-math/userguide/leastsquares.html)
regarding optimization yet I'm still unsure about how to apply those
examples to my case.

What I want to do is to optimize the parameters alpha, beta and gamma in
these three equations:
http://www.itl.nist.gov/div898/handbook/pmc/section4/pmc435.htm

I'm afraid I lack the mathematical understanding to come up with an
appropriate function. I well understand the Quadratic Problem example,
however, I'm kind of overwhelmed when trying to do this for my problem (as
my equation has three parts). Do I need to derive the different parameters
as it was done in the example? Is there a way to do that without
calculating derivatives?

I'd appreciate some help towards this task as I'm not making any process at
the moment. I hope this is the right place to put the question.

Thanks!

Thom

Re: [math] Usage of Marquardt Optimizer for an Equation

Posted by Gilles <gi...@harfang.homelinux.org>.
Hi.

On Mon, 7 Sep 2015 12:07:36 +0200, Thom Brown wrote:
> I've read both guides (
> 
> http://commons.apache.org/proper/commons-math/userguide/optimization.html
> and
> 
> http://commons.apache.org/proper/commons-math/userguide/leastsquares.html)
> regarding optimization yet I'm still unsure about how to apply those
> examples to my case.
>
> What I want to do is to optimize the parameters alpha, beta and gamma 
> in
> these three equations:
> http://www.itl.nist.gov/div898/handbook/pmc/section4/pmc435.htm

The code in the "o.a.c.m.fitting.leastsquares" package (second 
reference
to the user guide, above) should be fine.

> I'm afraid I lack the mathematical understanding to come up with an
> appropriate function. I well understand the Quadratic Problem 
> example,
> however, I'm kind of overwhelmed when trying to do this for my 
> problem (as
> my equation has three parts).

So, if you have N observations (indexed by the time variable), you'll 
have
3 * N measurements. And the "target" will be for example:

  [S(t0), b(t0), I(t0), S(t1), b(t1), I(t1), ..., S(tN), b(tN), I(tN)]

Then you have to define the "model" function which has to match the
contents of the "target" array.

> Do I need to derive the different parameters
> as it was done in the example?

You must provide the Jacobian (in the "model" function), i.e. a matrix 
where
each line corresponds to a measurement, and the columns must be the 
partial
derivatives wrt the parameters (i.e. "alpha", "beta" and "gamma").

> Is there a way to do that without
> calculating derivatives?

Why would you, since the derivatives are relatively easy to provide?

> I'd appreciate some help towards this task as I'm not making any 
> process at
> the moment. I hope this is the right place to put the question.

It's the right place, I hope. ;-)


HTH,
Gilles


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org