You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by liumin HU <lh...@sigems.fr> on 2008/01/15 14:51:17 UTC
Re: how it works jxpathcontext removeall?bug?
No one has a idea? Is it a bug of JXPath?
Or Someone tell me how to remove, please.
Thanks in advance.
liu
PS: I am using jxpath 1.2
----- Original Message -----
From: "liumin HU" <lh...@sigems.fr>
To: <us...@commons.apache.org>
Sent: Monday, December 31, 2007 12:11 PM
Subject: how it works jxpathcontext removeall?
hi everyone,
I use jxpath to manage an ArrayList of bean, the Context is created like:
JXPathContext context=JXPathContext.newContext(list);
When I want to delete some objects in the arraylist, i used
context.removeall, but it doesn't work.
Before and after call of removeall, the value of count is always 1.
context.getVariables().declareVariable("heure", _h);
System.out.println(context.getValue("count(/.[heureSelected=$heure])"));
====> 1.0
context.removePath("/.[heureSelected=$heure]");
System.out.println(context.getValue("count(/.[heureSelected=$heure])"));
====> 1.0
I tried too iterator.remove(), i got a exception.
Iterator<HeurePrescription> iter =
context.iterate("/.[heureSelected=$heure]");
while(iter.hasNext()){
iter.next();
iter.remove();
}
Any help is appreciated.
Thanks in advance
Liu
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: [math] Minimizer
Posted by mi...@TaosNet.com.
>>You can open a JIRA ticket to make sure we do not forget
>> this need.
Done:
Key: MATH-177
URL: https://issues.apache.org/jira/browse/MATH-177
Project: Commons Math
Issue Type: Improvement
Affects Versions: 2.0
Reporter: Mick
Fix For: 2.0
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: [math] jar after 08/19/2007
Posted by Phil Steitz <ph...@gmail.com>.
Luc is right that to work with unreleased sources, it is best to
checkout and build from svn. Feel free to ask questions here or
offline if you need help getting set up with subversion or maven.
I did just deploy a new snapshot jar to the apache snapshot repository here
http://people.apache.org/repo/m2-snapshot-repository/commons-math/commons-math/1.2-SNAPSHOT/
the new snapshot jar is commons-math-1.2-20080119.205359-2.jar
Note that the snapshot builds in this repository are not ASF releases
and should be used with caution.
Phil
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: [math] jar after 08/19/2007
Posted by Luc Maisonobe <Lu...@free.fr>.
mickeydog@TaosNet.com wrote:
> Is a jar available for commons math after 08/19/2007?
There is a result from a build in November here:
http://people.apache.org/builds/jakarta-commons/nightly/commons-math/commons-math-20071120-tar.gz
These compressed archive contains lots of things, including a
commons-math-1.2-SNAPSHOT.jar file.
You can also build one yourself from the subversion tree, which has
anonymous access enabled. You need a subversion client and maven 2. Here
is an exemple using the "svn" command line program in a GNU/Linux box:
svn co http://svn.apache.org/repos/asf/commons/proper/math/trunk math
cd math
mvn package
You should end up with a commons-math-1.2-SNAPSHOT.jar file in the
target directory.
Luc
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: [math] LevenbergMarquardtEstimator - maximal number of evaluations
exceeded
Posted by Luc Maisonobe <Lu...@free.fr>.
Al Lelopath a écrit :
> Ok, I have the source now. Thank you.
>
> Having some compile troubles. I've included the beanutils and
> discovery jars in the project.
> There are several source folders:
> src/experimental
> src/java
> src/mantissa/src
> src/mantissa/test-src
> src/
>
> src/java is the only one the compiles correctly at the moment.
> Listed below are representative errors. Can you offer any suggestions?
src/java is the [math] library by itself. The mantissa directories
correspond to a code base that is progressively integrated into [math].
Some parts have already been merged (Levenberg-Marquardt comes from
here) and hence they have been removed from this directory. Some
remaining parts did depend on the the transfered part so they cannot be
compiled anymore since the package names have been changed from
org.spaceroots to org.apache.commons.
The simplest way to compile everything is to use maven
(http://maven.apache.org/). Thanks to both its default settings and the
pom.xml configuration file, maven knows which directories should be
ignored. Download maven and launch it from the top directory like this:
mvn package
This will download "lots" of maven own plugins and the few dependencies
[math] needs. Hopefully, this huge download occurs only the first time
one uses maven. At the end, you should have a jar file in the target
directory.
Maven can be launched from a command shell as explained above, but can
also be integrated in your development environment (Eclipse, for example).
There are other ways to build [math] (using ant, using maven 1, using
eclipse ...).
Luc
>
> The import org.spaceroots.mantissa.estimation cannot be resolved
> AbstractCurveFitter.java
> commons-math-trunk/src/mantissa/src/org/spaceroots/mantissa/fitting
> line 24
>
> coefficients cannot be resolved AbstractCurveFitter.java
> commons-math-trunk/src/mantissa/src/org/spaceroots/mantissa/fitting
> line 112
>
> CorrelatedRandomVectorGeneratorTest cannot be resolved
> AllTests.java
> commons-math-trunk/src/mantissa/tests-src/org/spaceroots/mantissa/random
> line 33
>
> DescriptiveStatistics cannot be resolved to a type
> BeanListUnivariateImplTest.java
> commons-math-trunk/src/experimental/org/apache/commons/math/stat/univariate
> line 153
>
> EstimatedParameter cannot be resolved to a type
> AbstractCurveFitter.java
> commons-math-trunk/src/mantissa/src/org/spaceroots/mantissa/fitting
> line 119
>
> GaussNewtonEstimator cannot be resolved to a type
> HarmonicFitter.java
> commons-math-trunk/src/mantissa/src/org/spaceroots/mantissa/fitting
> line 131
>
> ---------------------------------------------------------------------
> 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
Re: [math] LevenbergMarquardtEstimator - maximal number of evaluations exceeded
Posted by Al Lelopath <jd...@gmail.com>.
Ok, I have the source now. Thank you.
Having some compile troubles. I've included the beanutils and
discovery jars in the project.
There are several source folders:
src/experimental
src/java
src/mantissa/src
src/mantissa/test-src
src/
src/java is the only one the compiles correctly at the moment.
Listed below are representative errors. Can you offer any suggestions?
The import org.spaceroots.mantissa.estimation cannot be resolved
AbstractCurveFitter.java
commons-math-trunk/src/mantissa/src/org/spaceroots/mantissa/fitting
line 24
coefficients cannot be resolved AbstractCurveFitter.java
commons-math-trunk/src/mantissa/src/org/spaceroots/mantissa/fitting
line 112
CorrelatedRandomVectorGeneratorTest cannot be resolved
AllTests.java
commons-math-trunk/src/mantissa/tests-src/org/spaceroots/mantissa/random
line 33
DescriptiveStatistics cannot be resolved to a type
BeanListUnivariateImplTest.java
commons-math-trunk/src/experimental/org/apache/commons/math/stat/univariate
line 153
EstimatedParameter cannot be resolved to a type
AbstractCurveFitter.java
commons-math-trunk/src/mantissa/src/org/spaceroots/mantissa/fitting
line 119
GaussNewtonEstimator cannot be resolved to a type
HarmonicFitter.java
commons-math-trunk/src/mantissa/src/org/spaceroots/mantissa/fitting
line 131
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: [math] LevenbergMarquardtEstimator - maximal number of evaluations exceeded
Posted by Al Lelopath <jd...@gmail.com>.
Checking thresholds:
Started at the default of course (1000) and have gone to 10^4, 10^5,
10^6 with the same result
(with my 'manually' modified code, not from repository
On Jan 29, 2008 9:41 AM, Al Lelopath <jd...@gmail.com> wrote:
> I am having trouble accessing the svn repository, so for now, I'll
> have to change the code myself.
> If you are going to make the change below, then I guess a new
> constructor must be added to EstimationException:
>
> public EstimationException(String specifier, Object[] parts) {
> super(specifier, parts);
>
> }
>
> On Jan 28, 2008 11:23 AM, Luc Maisonobe <Lu...@free.fr> wrote:
> > Mickey wrote:
> > > When using the LevenbergMarquardtEstimator to solve for a quardratic
> > > equation. I get the exception below. Can anyone explain to me what is
> > > happening? This code works for most data that I have, but not in this
> > > particular case. This code is set into motion by clicking a button.
> > >
> > > The code that throw the exception is:
> > >
> > > throw new EstimationException("maximal number of evaluations exceeded
> > > ({0})",
> > > new String[] {
> > > Integer.toString(maxCostEval)
> > > });
> > >
> > > In this case maxCostEval is 1000. I tried setting it to 10,000, but I
> > > still get the same error. I'm confused first of all in that the String
> > > above doesn't appear in the exception and second in what the
> > > NoSuchMethodError is supposed to indicate.
> > >
> > > exception:
> > > ------------------------------------------------------------------------------
> > >
> > > Jan 28, 2008 7:45:52 AM STDERR: Exception in thread "AWT-EventQueue-0"
> > > Jan 28, 2008 7:45:52 AM STDERR: java.lang.NoSuchMethodError:
> > > org.apache.commons.math.MathException.<init>(Ljava/lang/String;[Ljava/lang/Object;)V
> > >
> > > Jan 28, 2008 7:45:52 AM STDERR: at
> > > org.apache.commons.math.estimation.EstimationException.<init>(EstimationException.java:42)
> > >
> > > Jan 28, 2008 7:45:52 AM STDERR: at
> > > org.apache.commons.math.estimation.LevenbergMarquardtEstimator.estimate(LevenbergMarquardtEstimator.java:511)
> >
> > This shows an error in [math], thanks for reporting it. I have fixed
> > this as of r615975 a few minutes ago. You seem to have a version more
> > than a few days old (this code has changed recently), so either you
> > check out the all source again or you port the fix into your version.
> > For this, you should change in the exception construction:
> > new String[] {
> > Integer.toString(maxCostEval)
> > });
> > into:
> > new Object[] { new Integer(maxCostEval) });
> >
> >
> >
> > However, the fact the exception is thrown shows there is a convergence
> > problem. Could you check the thresholds ?
> >
> >
> > Luc
> >
> >
> > > (... and more ...)
> > >
> > > ---------------------------------------------------------------------
> > > 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
For additional commands, e-mail: user-help@commons.apache.org
Re: [math] LevenbergMarquardtEstimator - maximal number of evaluations
exceeded
Posted by Luc Maisonobe <Lu...@free.fr>.
Al Lelopath wrote:
> I am having trouble accessing the svn repository, so for now, I'll
> have to change the code myself.
> If you are going to make the change below, then I guess a new
> constructor must be added to EstimationException:
>
> public EstimationException(String specifier, Object[] parts) {
> super(specifier, parts);
> }
Yes. In fact it is the only constructor remaining in this class right now.
Luc
>
> On Jan 28, 2008 11:23 AM, Luc Maisonobe <Lu...@free.fr> wrote:
>> Mickey wrote:
>>> When using the LevenbergMarquardtEstimator to solve for a quardratic
>>> equation. I get the exception below. Can anyone explain to me what is
>>> happening? This code works for most data that I have, but not in this
>>> particular case. This code is set into motion by clicking a button.
>>>
>>> The code that throw the exception is:
>>>
>>> throw new EstimationException("maximal number of evaluations exceeded
>>> ({0})",
>>> new String[] {
>>> Integer.toString(maxCostEval)
>>> });
>>>
>>> In this case maxCostEval is 1000. I tried setting it to 10,000, but I
>>> still get the same error. I'm confused first of all in that the String
>>> above doesn't appear in the exception and second in what the
>>> NoSuchMethodError is supposed to indicate.
>>>
>>> exception:
>>> ------------------------------------------------------------------------------
>>>
>>> Jan 28, 2008 7:45:52 AM STDERR: Exception in thread "AWT-EventQueue-0"
>>> Jan 28, 2008 7:45:52 AM STDERR: java.lang.NoSuchMethodError:
>>> org.apache.commons.math.MathException.<init>(Ljava/lang/String;[Ljava/lang/Object;)V
>>>
>>> Jan 28, 2008 7:45:52 AM STDERR: at
>>> org.apache.commons.math.estimation.EstimationException.<init>(EstimationException.java:42)
>>>
>>> Jan 28, 2008 7:45:52 AM STDERR: at
>>> org.apache.commons.math.estimation.LevenbergMarquardtEstimator.estimate(LevenbergMarquardtEstimator.java:511)
>> This shows an error in [math], thanks for reporting it. I have fixed
>> this as of r615975 a few minutes ago. You seem to have a version more
>> than a few days old (this code has changed recently), so either you
>> check out the all source again or you port the fix into your version.
>> For this, you should change in the exception construction:
>> new String[] {
>> Integer.toString(maxCostEval)
>> });
>> into:
>> new Object[] { new Integer(maxCostEval) });
>>
>>
>>
>> However, the fact the exception is thrown shows there is a convergence
>> problem. Could you check the thresholds ?
>>
>>
>> Luc
>>
>>
>>> (... and more ...)
>>>
>>> ---------------------------------------------------------------------
>>> 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
> 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
Re: [math] LevenbergMarquardtEstimator - maximal number of evaluations exceeded
Posted by Al Lelopath <jd...@gmail.com>.
I am having trouble accessing the svn repository, so for now, I'll
have to change the code myself.
If you are going to make the change below, then I guess a new
constructor must be added to EstimationException:
public EstimationException(String specifier, Object[] parts) {
super(specifier, parts);
}
On Jan 28, 2008 11:23 AM, Luc Maisonobe <Lu...@free.fr> wrote:
> Mickey wrote:
> > When using the LevenbergMarquardtEstimator to solve for a quardratic
> > equation. I get the exception below. Can anyone explain to me what is
> > happening? This code works for most data that I have, but not in this
> > particular case. This code is set into motion by clicking a button.
> >
> > The code that throw the exception is:
> >
> > throw new EstimationException("maximal number of evaluations exceeded
> > ({0})",
> > new String[] {
> > Integer.toString(maxCostEval)
> > });
> >
> > In this case maxCostEval is 1000. I tried setting it to 10,000, but I
> > still get the same error. I'm confused first of all in that the String
> > above doesn't appear in the exception and second in what the
> > NoSuchMethodError is supposed to indicate.
> >
> > exception:
> > ------------------------------------------------------------------------------
> >
> > Jan 28, 2008 7:45:52 AM STDERR: Exception in thread "AWT-EventQueue-0"
> > Jan 28, 2008 7:45:52 AM STDERR: java.lang.NoSuchMethodError:
> > org.apache.commons.math.MathException.<init>(Ljava/lang/String;[Ljava/lang/Object;)V
> >
> > Jan 28, 2008 7:45:52 AM STDERR: at
> > org.apache.commons.math.estimation.EstimationException.<init>(EstimationException.java:42)
> >
> > Jan 28, 2008 7:45:52 AM STDERR: at
> > org.apache.commons.math.estimation.LevenbergMarquardtEstimator.estimate(LevenbergMarquardtEstimator.java:511)
>
> This shows an error in [math], thanks for reporting it. I have fixed
> this as of r615975 a few minutes ago. You seem to have a version more
> than a few days old (this code has changed recently), so either you
> check out the all source again or you port the fix into your version.
> For this, you should change in the exception construction:
> new String[] {
> Integer.toString(maxCostEval)
> });
> into:
> new Object[] { new Integer(maxCostEval) });
>
>
>
> However, the fact the exception is thrown shows there is a convergence
> problem. Could you check the thresholds ?
>
>
> Luc
>
>
> > (... and more ...)
> >
> > ---------------------------------------------------------------------
> > 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
For additional commands, e-mail: user-help@commons.apache.org
Re: [math] LevenbergMarquardtEstimator - maximal number of evaluations
exceeded
Posted by Luc Maisonobe <Lu...@free.fr>.
Mickey wrote:
> When using the LevenbergMarquardtEstimator to solve for a quardratic
> equation. I get the exception below. Can anyone explain to me what is
> happening? This code works for most data that I have, but not in this
> particular case. This code is set into motion by clicking a button.
>
> The code that throw the exception is:
>
> throw new EstimationException("maximal number of evaluations exceeded
> ({0})",
> new String[] {
> Integer.toString(maxCostEval)
> });
>
> In this case maxCostEval is 1000. I tried setting it to 10,000, but I
> still get the same error. I'm confused first of all in that the String
> above doesn't appear in the exception and second in what the
> NoSuchMethodError is supposed to indicate.
>
> exception:
> ------------------------------------------------------------------------------
>
> Jan 28, 2008 7:45:52 AM STDERR: Exception in thread "AWT-EventQueue-0"
> Jan 28, 2008 7:45:52 AM STDERR: java.lang.NoSuchMethodError:
> org.apache.commons.math.MathException.<init>(Ljava/lang/String;[Ljava/lang/Object;)V
>
> Jan 28, 2008 7:45:52 AM STDERR: at
> org.apache.commons.math.estimation.EstimationException.<init>(EstimationException.java:42)
>
> Jan 28, 2008 7:45:52 AM STDERR: at
> org.apache.commons.math.estimation.LevenbergMarquardtEstimator.estimate(LevenbergMarquardtEstimator.java:511)
This shows an error in [math], thanks for reporting it. I have fixed
this as of r615975 a few minutes ago. You seem to have a version more
than a few days old (this code has changed recently), so either you
check out the all source again or you port the fix into your version.
For this, you should change in the exception construction:
new String[] {
Integer.toString(maxCostEval)
});
into:
new Object[] { new Integer(maxCostEval) });
However, the fact the exception is thrown shows there is a convergence
problem. Could you check the thresholds ?
Luc
> (... and more ...)
>
> ---------------------------------------------------------------------
> 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
[math] LevenbergMarquardtEstimator - maximal number of evaluations
exceeded
Posted by Mickey <mi...@taosnet.com>.
When using the LevenbergMarquardtEstimator to solve for a quardratic
equation. I get the exception below. Can anyone explain to me what is
happening? This code works for most data that I have, but not in this
particular case. This code is set into motion by clicking a button.
The code that throw the exception is:
throw new EstimationException("maximal number of evaluations exceeded
({0})",
new String[] {
Integer.toString(maxCostEval)
});
In this case maxCostEval is 1000. I tried setting it to 10,000, but I
still get the same error. I'm confused first of all in that the String
above doesn't appear in the exception and second in what the
NoSuchMethodError is supposed to indicate.
exception:
------------------------------------------------------------------------------
Jan 28, 2008 7:45:52 AM
STDERR: Exception in thread "AWT-EventQueue-0"
Jan 28, 2008 7:45:52 AM
STDERR: java.lang.NoSuchMethodError:
org.apache.commons.math.MathException.<init>(Ljava/lang/String;[Ljava/lang/Object;)V
Jan 28, 2008 7:45:52 AM
STDERR: at
org.apache.commons.math.estimation.EstimationException.<init>(EstimationException.java:42)
Jan 28, 2008 7:45:52 AM
STDERR: at
org.apache.commons.math.estimation.LevenbergMarquardtEstimator.estimate(LevenbergMarquardtEstimator.java:511)
(... and more ...)
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
[math] jar after 08/19/2007
Posted by mi...@TaosNet.com.
Is a jar available for commons math after 08/19/2007?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: [math] Minimizer
Posted by Luc Maisonobe <Lu...@free.fr>.
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
For additional commands, e-mail: user-help@commons.apache.org
Re: [math] Minimizer
Posted by mi...@TaosNet.com.
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.
>>> 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
Re: [math] Minimizer
Posted by Luc Maisonobe <Lu...@free.fr>.
mickeydog@TaosNet.com a écrit :
> sorry .. curve OR surface
>
>> Does the math API have a minimizer?
>>
>> 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
Re: [math] Minimizer
Posted by Luc Maisonobe <Lu...@free.fr>.
mickeydog@TaosNet.com a écrit :
>>> The current subversion tree provides an
> org.apache.commons.math.optimization >>package which contains a
> Levenberg-Marquardt least squares solver.
> Do you mean to say the org.apache.commons.math.estimation package?
Yes, sorry for the confusion
Luc
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: [math] Minimizer
Posted by mi...@TaosNet.com.
>>The current subversion tree provides an
org.apache.commons.math.optimization >>package which contains a
Levenberg-Marquardt least squares solver.
Do you mean to say the org.apache.commons.math.estimation package?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: [math] Minimizer
Posted by mi...@TaosNet.com.
sorry .. curve OR surface
> Does the math API have a minimizer?
>
> I have a curve of surface that is guaranteed to have one minimum.
> How would I use apache commons to find it?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
[math] Minimizer
Posted by mi...@TaosNet.com.
Does the math API have a minimizer?
I have a curve of surface that is guaranteed to have one minimum.
How would I use apache commons to find it?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org