# commons-user mailing list archives

##### Site index · List index
Message view
Top
From Luc Maisonobe <Luc.Maison...@free.fr>
Subject Re: [math] Minimizer
Date Wed, 16 Jan 2008 19:28:52 GMT
```mickeydog@TaosNet.com a écrit :
> I'm not sure why you recommended minimizing z^2, as opposed to just z.
> If, for example, z12 = f(1,2) = -5 and z41 = f(4,1) = 2, then z12^2 = 25
> and z41^2 = 4, thus giving z41 as the minimum point, not z12.

You are right, but currently we provide least squares only. If you know
a low bounding value (say -100 or -1.Oe6), you can use (z + low)^2. The
limitation to least-squares problems comes from the Levenberg-Marquardt
algorithm. For a more general minimizer (not for quadratic forms), you
may try to modify the Gauss-Newton algorithm implementation. The
classical algorithm is not specialized, but my current implementation in
[math] is. I dealt with least squares problems only when I wrote this.

We should certainly refactor this and provide a general minimizing
package with a classical GN, steepest descent and also conjugate
gradient. We could use them as a basis for some least-squares solvers
(and also keep the very efficient and specialized Levenberg-Marquardt
too). Such a new package would be nice for 2.0. For now we are trying to
finalize 1.2. You can open a JIRA ticket to make sure we do not forget
this need.

Luc

>
>>>> I have a curve of surface that is guaranteed to have one minimum.
>>>> How would I use apache commons to find it?
>> The current subversion tree provides an
>> org.apache.commons.math.optimization package which contains a
>> Levenberg-Marquardt least squares solver. For a 2D surface in a 3D
>> space, you could say your problem is to find the pair (x,y) that
>> minimizes z^2 with z=f(x,y). For a 1D problem, you may prefer to solve
>> f'(x) = 0 using one of the existing root solvers.
>>
>> The optimization code has not been released for now (it will be part of
>> the 1.2 release), but it is quite stable. You will find examples in the
>> archive of this list.
>>
>> Luc
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> For additional commands, e-mail: user-help@commons.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org