You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by er...@apache.org on 2018/08/29 00:15:52 UTC
[1/4] [math] Javadoc.
Repository: commons-math
Updated Branches:
refs/heads/master e009e73e7 -> efb023006
Javadoc.
Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/c89916ca
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/c89916ca
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/c89916ca
Branch: refs/heads/master
Commit: c89916ca4ceec5ce4011620b90d660dbacfe3ae2
Parents: e009e73
Author: Gilles <er...@apache.org>
Authored: Tue Aug 28 20:09:12 2018 +0200
Committer: Gilles <er...@apache.org>
Committed: Tue Aug 28 20:09:12 2018 +0200
----------------------------------------------------------------------
.../commons/math4/fitting/leastsquares/LeastSquaresFactory.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-math/blob/c89916ca/src/main/java/org/apache/commons/math4/fitting/leastsquares/LeastSquaresFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/fitting/leastsquares/LeastSquaresFactory.java b/src/main/java/org/apache/commons/math4/fitting/leastsquares/LeastSquaresFactory.java
index bd236db..145ec86 100644
--- a/src/main/java/org/apache/commons/math4/fitting/leastsquares/LeastSquaresFactory.java
+++ b/src/main/java/org/apache/commons/math4/fitting/leastsquares/LeastSquaresFactory.java
@@ -46,7 +46,7 @@ public class LeastSquaresFactory {
/**
* Create a {@link org.apache.commons.math4.fitting.leastsquares.LeastSquaresProblem}
- * from the given elements. There will be no weights applied (unit weights).
+ * from the given elements.
*
* @param model the model function. Produces the computed values.
* @param observed the observed (target) values
[4/4] [math] Unit test for MATH-1466.
Posted by er...@apache.org.
Unit test for MATH-1466.
Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/efb02300
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/efb02300
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/efb02300
Branch: refs/heads/master
Commit: efb0230063b31d53bd077d9f6a4bb64fcbb9c97f
Parents: 2b4fcc2
Author: Gilles <er...@apache.org>
Authored: Wed Aug 29 02:13:57 2018 +0200
Committer: Gilles <er...@apache.org>
Committed: Wed Aug 29 02:13:57 2018 +0200
----------------------------------------------------------------------
.../scalar/noderiv/CMAESOptimizerTest.java | 24 ++++++++++++++++++++
1 file changed, 24 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-math/blob/efb02300/src/test/java/org/apache/commons/math4/optim/nonlinear/scalar/noderiv/CMAESOptimizerTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/optim/nonlinear/scalar/noderiv/CMAESOptimizerTest.java b/src/test/java/org/apache/commons/math4/optim/nonlinear/scalar/noderiv/CMAESOptimizerTest.java
index f7ea7b8..d7fb53d 100644
--- a/src/test/java/org/apache/commons/math4/optim/nonlinear/scalar/noderiv/CMAESOptimizerTest.java
+++ b/src/test/java/org/apache/commons/math4/optim/nonlinear/scalar/noderiv/CMAESOptimizerTest.java
@@ -158,6 +158,30 @@ public class CMAESOptimizerTest {
}
@Test
+ public void testMath1466() {
+ final CMAESOptimizer optimizer
+ = new CMAESOptimizer(30000, Double.NEGATIVE_INFINITY, true, 10,
+ 0, RandomSource.create(RandomSource.MT_64), false, null);
+ final MultivariateFunction fitnessFunction = new MultivariateFunction() {
+ @Override
+ public double value(double[] x) {
+ return x[0] * x[0] - 100;
+ }
+ };
+
+ final double[] start = { 100 };
+ final double[] sigma = { 1e-1 };
+ final double[] result = optimizer.optimize(new MaxEval(10000),
+ new ObjectiveFunction(fitnessFunction),
+ SimpleBounds.unbounded(1),
+ GoalType.MINIMIZE,
+ new CMAESOptimizer.PopulationSize(5),
+ new CMAESOptimizer.Sigma(sigma),
+ new InitialGuess(start)).getPoint();
+ Assert.assertEquals(0, result[0], 1e-7);
+ }
+
+ @Test
public void testEllipse() {
double[] startPoint = point(DIM,1.0);
double[] insigma = point(DIM,0.1);
[3/4] [math] Update dependencies.
Posted by er...@apache.org.
Update dependencies.
Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/2b4fcc2c
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/2b4fcc2c
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/2b4fcc2c
Branch: refs/heads/master
Commit: 2b4fcc2c214ced954a041adcc05be1523a494c0c
Parents: b3fb9a1
Author: Gilles <er...@apache.org>
Authored: Wed Aug 29 02:13:05 2018 +0200
Committer: Gilles <er...@apache.org>
Committed: Wed Aug 29 02:13:05 2018 +0200
----------------------------------------------------------------------
pom.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-math/blob/2b4fcc2c/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 3ab9fe5..e7d9413 100644
--- a/pom.xml
+++ b/pom.xml
@@ -416,19 +416,19 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-rng-client-api</artifactId>
- <version>1.0</version>
+ <version>1.1</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-rng-simple</artifactId>
- <version>1.0</version>
+ <version>1.1</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-rng-sampling</artifactId>
- <version>1.1-SNAPSHOT</version>
+ <version>1.1</version>
</dependency>
<dependency>
[2/4] [math] Formatting.
Posted by er...@apache.org.
Formatting.
Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/b3fb9a1f
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/b3fb9a1f
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/b3fb9a1f
Branch: refs/heads/master
Commit: b3fb9a1f6a5b2ce13f83fa9aee277abc1781461e
Parents: c89916c
Author: Gilles <er...@apache.org>
Authored: Tue Aug 28 20:12:33 2018 +0200
Committer: Gilles <er...@apache.org>
Committed: Tue Aug 28 20:12:33 2018 +0200
----------------------------------------------------------------------
.../commons/math4/fitting/leastsquares/LeastSquaresFactory.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-math/blob/b3fb9a1f/src/main/java/org/apache/commons/math4/fitting/leastsquares/LeastSquaresFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/fitting/leastsquares/LeastSquaresFactory.java b/src/main/java/org/apache/commons/math4/fitting/leastsquares/LeastSquaresFactory.java
index 145ec86..8c0db8a 100644
--- a/src/main/java/org/apache/commons/math4/fitting/leastsquares/LeastSquaresFactory.java
+++ b/src/main/java/org/apache/commons/math4/fitting/leastsquares/LeastSquaresFactory.java
@@ -328,8 +328,7 @@ public class LeastSquaresFactory {
final double[] p = point.toArray();
// Evaluate.
- return new Pair<>(computeValue(p),
- computeJacobian(p));
+ return new Pair<>(computeValue(p), computeJacobian(p));
}
/** {@inheritDoc} */