Author: luc
Date: Wed Feb 19 20:32:43 2014
New Revision: 1569907
URL: http://svn.apache.org/r1569907
Log:
Make QR the default in GaussNewtonOptimizer
Theoretically QR offers the best blend of speed and numerical stability.
Empirically the QR implementation is slightly faster than the Cholesky
implementation.
Modified:
commons/proper/math/trunk/src/changes/changes.xml
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/fitting/leastsquares/GaussNewtonOptimizer.java
Modified: commons/proper/math/trunk/src/changes/changes.xml
URL:
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/changes/changes.xml?rev=1569907&r1=1569906&r2=1569907&view=diff
==============================================================================
--- commons/proper/math/trunk/src/changes/changes.xml (original)
+++ commons/proper/math/trunk/src/changes/changes.xml Wed Feb 19 20:32:43 2014
@@ -52,6 +52,9 @@ If the output is not quite correct, chec
<body>
<release version="3.3" date="TBD" description="TBD">
<action dev="luc" type="update" issue="MATH-1099" due-to="Evan Ward">
+ Make QR the default in GaussNewtonOptimizer.
+ </action>
+ <action dev="luc" type="update" issue="MATH-1099" due-to="Evan Ward">
Add Cholesky option to GaussNewtonOptimizer.
</action>
<action dev="luc" type="update" issue="MATH-1099" due-to="Evan Ward">
Modified:
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/fitting/leastsquares/GaussNewtonOptimizer.java
URL:
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/fitting/leastsquares/GaussNewtonOptimizer.java?rev=1569907&r1=1569906&r2=1569907&view=diff
==============================================================================
---
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/fitting/leastsquares/GaussNewtonOptimizer.java
(original)
+++
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/fitting/leastsquares/GaussNewtonOptimizer.java
Wed Feb 19 20:32:43 2014
@@ -69,7 +69,7 @@ public class GaussNewtonOptimizer implem
.getSolver()
.solve(jTr);
} catch (SingularMatrixException e) {
- throw new
ConvergenceException(LocalizedFormats.UNABLE_TO_SOLVE_SINGULAR_PROBLEM);
+ throw new
ConvergenceException(LocalizedFormats.UNABLE_TO_SOLVE_SINGULAR_PROBLEM, e);
}
}
},
@@ -90,7 +90,7 @@ public class GaussNewtonOptimizer implem
.getSolver()
.solve(residuals);
} catch (SingularMatrixException e) {
- throw new
ConvergenceException(LocalizedFormats.UNABLE_TO_SOLVE_SINGULAR_PROBLEM);
+ throw new
ConvergenceException(LocalizedFormats.UNABLE_TO_SOLVE_SINGULAR_PROBLEM, e);
}
}
},
@@ -116,7 +116,7 @@ public class GaussNewtonOptimizer implem
.getSolver()
.solve(jTr);
} catch (NonPositiveDefiniteMatrixException e) {
- throw new
ConvergenceException(LocalizedFormats.UNABLE_TO_SOLVE_SINGULAR_PROBLEM);
+ throw new
ConvergenceException(LocalizedFormats.UNABLE_TO_SOLVE_SINGULAR_PROBLEM, e);
}
}
};
@@ -148,11 +148,11 @@ public class GaussNewtonOptimizer implem
/**
* Creates a Gauss Newton optimizer.
* <p/>
- * The default for the algorithm is to solve the normal equations using LU
+ * The default for the algorithm is to solve the normal equations using QR
* decomposition.
*/
public GaussNewtonOptimizer() {
- this(Decomposition.LU);
+ this(Decomposition.QR);
}
/**