Commit Graph

1627 Commits

Author SHA1 Message Date
Luc Maisonobe ed8fc4a03a updated general algorithms with latest interfaces definitions
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@758058 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 22:15:08 +00:00
Luc Maisonobe d99003bc0f updated univariate algorithms with latest interfaces definitions
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@758056 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 22:14:03 +00:00
Luc Maisonobe c03fbc71a6 updated direct algorithms with latest interfaces definitions
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@758054 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 22:13:27 +00:00
Luc Maisonobe 891bb84cd0 added new simple convergence checkers implementations
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@758053 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 22:12:32 +00:00
Luc Maisonobe 2d116267b4 improved consistency in class naming with respect to functions in the analysis package
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@758052 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 22:11:16 +00:00
Luc Maisonobe fa4c993e5d removed spurious exception in optimization
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@758051 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 22:10:16 +00:00
Luc Maisonobe 07425ec8ae improved consistency in class naming with respect to functions in the analysis package
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@758049 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 22:09:34 +00:00
Luc Maisonobe 70d82c4fe6 removed spurious exception in optimization
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@758047 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 22:06:39 +00:00
Luc Maisonobe 187dd35c9a use a single set of consistent functions definitions in the analysis package
instead of one set in the analysis and another one in optimization


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@758046 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 22:05:13 +00:00
Luc Maisonobe 31e9c848f2 fixed a forgotten counter update
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@757183 13f79535-47bb-0310-9956-ffa450edef68
2009-03-22 13:19:05 +00:00
Luc Maisonobe 87c0ddbc6e separated iteration counter from function evaluation counters,
some optimizers are based on gradient/jacobian only and cannot
reliably be protected by monitoring the objective function calls.

We now have two or three counters for each algorithm:
 - iteration counter, which is checked against a max allowance
   to prevent infinite loops if no convergence is reached
 - objective function evaluations, for user information only
 - objective function gradient/jacobian if the function is
   differentiable, for user information only

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@757181 13f79535-47bb-0310-9956-ffa450edef68
2009-03-22 13:00:00 +00:00
Luc Maisonobe cfa4345431 renamed SimpleValueChecker into SimpleScalarValueChecker
for consistency with the vectorial checker name

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@757180 13f79535-47bb-0310-9956-ffa450edef68
2009-03-22 12:54:45 +00:00
Luc Maisonobe 39647f7f30 fixed checkstyle and findbugs errors
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@754765 13f79535-47bb-0310-9956-ffa450edef68
2009-03-15 21:35:38 +00:00
Luc Maisonobe 77a6b785d2 updated documentation after the redesign of the optimization package
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@754764 13f79535-47bb-0310-9956-ffa450edef68
2009-03-15 21:34:47 +00:00
Luc Maisonobe c12aa3b936 added all necessary multi-start optimizers types
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@754763 13f79535-47bb-0310-9956-ffa450edef68
2009-03-15 21:33:31 +00:00
Luc Maisonobe 8f6fd887f5 removed a spurious print statement
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@754750 13f79535-47bb-0310-9956-ffa450edef68
2009-03-15 21:03:39 +00:00
Luc Maisonobe 94f9b580a5 fixed typo in package documentation
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@754744 13f79535-47bb-0310-9956-ffa450edef68
2009-03-15 20:33:47 +00:00
Luc Maisonobe 61ca8c04df resurrected the estimation package but with all interfaces and classes deprecated
this will help users switch smoothly to the new optimization.general package

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@754732 13f79535-47bb-0310-9956-ffa450edef68
2009-03-15 19:30:44 +00:00
Luc Maisonobe c37f06ed3a adapted old Levenberg-Marquardt estimator to new top level optimizers API
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@754727 13f79535-47bb-0310-9956-ffa450edef68
2009-03-15 19:11:02 +00:00
Luc Maisonobe 3a0df1ba48 adapted the Gauss-Newton optimizer to the new top-level optimization interfaces
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@754500 13f79535-47bb-0310-9956-ffa450edef68
2009-03-14 17:38:27 +00:00
Luc Maisonobe 27c1eb726a updated optimization main interfaces to handle scalar and vectorial functions
and to handle functions with or without explicit derivatives

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@754499 13f79535-47bb-0310-9956-ffa450edef68
2009-03-14 17:35:49 +00:00
Luc Maisonobe 4f206ca3ee continued refactoring of optimization framework:
- improved general interfaces at top optimization level
 - added a simple implementation of ConvergenceChecker (ObjectiveValueChecker)
 - added a general multi-start wrapper
 - changed the direct search optimizers to the new interfaces

This work is still not complete yet. The general package classes
are very close to the former design, they have almost not been changed
structurally.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@749850 13f79535-47bb-0310-9956-ffa450edef68
2009-03-04 00:07:51 +00:00
Luc Maisonobe 4a64740b4a added compareTo method with epsilon
JIRA: MATH-247

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@749139 13f79535-47bb-0310-9956-ffa450edef68
2009-03-01 22:21:22 +00:00
Luc Maisonobe 722fc97a7a started refactoring of optimization framework:
- created subpackages optimization.direct, optimization.general,
   optimization.linear (currently empty) and optimization.univariate
 - removed packages analysis.minimization and estimation
 - renamed all Cost-related interfaces/classes into Objective
   (this allows both minimization and maximization)
 - added a few new general interfaces

This work is not complete yet. The direct and general packages classes
are very close to the former design, they have almost not been changed
structurally.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@748274 13f79535-47bb-0310-9956-ffa450edef68
2009-02-26 19:17:39 +00:00
William Barker 1cf41555f1 epsilon needs to be set before calling isZero, plus copy epsilon for append
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@747650 13f79535-47bb-0310-9956-ffa450edef68
2009-02-25 03:32:52 +00:00
Luc Maisonobe 1fe117edf0 minor code cleanups
(error messages, javadoc, avoiding array copies, final attributes ...)

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@747544 13f79535-47bb-0310-9956-ffa450edef68
2009-02-24 20:59:41 +00:00
Luc Maisonobe fafe306ce7 fixed wrong word in javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@746583 13f79535-47bb-0310-9956-ffa450edef68
2009-02-21 20:21:38 +00:00
Luc Maisonobe f1ee00c759 handle NaN and infinities correctly in the MathUtils.equals method with tolerance
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@746582 13f79535-47bb-0310-9956-ffa450edef68
2009-02-21 20:16:36 +00:00
Luc Maisonobe c1b97f87d5 fixed exception type in a test
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@746579 13f79535-47bb-0310-9956-ffa450edef68
2009-02-21 20:02:59 +00:00
Luc Maisonobe 2f335ac471 replaced Object[] parameters by variable arguments in exceptions constructors
this allows simpler error declaration and removes the need for the strange
null argument with fixed messages

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@746578 13f79535-47bb-0310-9956-ffa450edef68
2009-02-21 20:01:14 +00:00
Luc Maisonobe 8bf548c5e8 Fixed an error in computing gcd and lcm for some extreme values at integer range boundaries.
JIRA: MATH-243

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@746511 13f79535-47bb-0310-9956-ffa450edef68
2009-02-21 13:54:25 +00:00
Luc Maisonobe 39a80bf2cd Added a MathUtils method to check equality given some error bounds
JIRA: MATH-247

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@746506 13f79535-47bb-0310-9956-ffa450edef68
2009-02-21 13:36:08 +00:00
Luc Maisonobe da9117b726 added a no-args constructor for GaussNewtonEstimator
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@745188 13f79535-47bb-0310-9956-ffa450edef68
2009-02-17 18:38:32 +00:00
Phil Steitz 4cc86649f4 Increased sensitivity of test and added another p-value verification.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@744918 13f79535-47bb-0310-9956-ffa450edef68
2009-02-16 13:52:33 +00:00
Phil Steitz 64fa01cd78 Added Pearsons correlation implemendation. JIRA: MATH-114
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@744802 13f79535-47bb-0310-9956-ffa450edef68
2009-02-16 05:09:49 +00:00
Phil Steitz 2d73d9f99a Changed to persist and expose the number of observations in the source dataset.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@744800 13f79535-47bb-0310-9956-ffa450edef68
2009-02-16 05:04:57 +00:00
Luc Maisonobe f24bbdd41d moved the decomposition algorithms in a subpackage of the linear package
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@744768 13f79535-47bb-0310-9956-ffa450edef68
2009-02-15 21:59:09 +00:00
Luc Maisonobe 0992284ca5 improved error messages consistency
fixed checkstyle warnings

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@744724 13f79535-47bb-0310-9956-ffa450edef68
2009-02-15 19:15:51 +00:00
Luc Maisonobe 59e6743960 fixed findbugs warning
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@744717 13f79535-47bb-0310-9956-ffa450edef68
2009-02-15 18:40:31 +00:00
Luc Maisonobe 3796de49e0 fixed checkstyle warnings
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@744716 13f79535-47bb-0310-9956-ffa450edef68
2009-02-15 18:38:49 +00:00
Luc Maisonobe 098b003e18 added Cholesky decomposition
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@744708 13f79535-47bb-0310-9956-ffa450edef68
2009-02-15 17:53:32 +00:00
Luc Maisonobe 23a8fc2592 removed references to InvalidStateException, they are never thrown
cleaned up exception messages

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@744682 13f79535-47bb-0310-9956-ffa450edef68
2009-02-15 15:43:52 +00:00
Luc Maisonobe b29a6c1e6e moved NotPositiveDefiniteMatrixException to the linear package
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@744681 13f79535-47bb-0310-9956-ffa450edef68
2009-02-15 15:39:50 +00:00
William Barker 63e1a2c76c Add working equals to SparseRealVector.
hashCode implementation is minimal, but I can't see a use case for using a SparseRealVector as a key.

Remove unused imports from OpenInToDoubleHashMap.

Some cleanup for optimized methods, and javadoc fixes.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@744614 13f79535-47bb-0310-9956-ffa450edef68
2009-02-15 06:46:15 +00:00
Luc Maisonobe e01294b158 Failed attempt to implement Strassen matrix multiplication on recursive layout as
described in Siddhartha Chatterjee, Alvin R. Lebeck, Praveen K. Patnala and Mithuna
Thottehodi paper "Recursive Array Layout and Fast Matrix Multiplication".

As of 2009-02-13, this implementation does not work! The padding at left and bottom
sides of the matrix should be cleared after some operations like scalerAdd and is not.
Also there is a limitation in the multiplication that can only process matrices with
sizes similar enough to have the same power of two number of tiles in all three
matrices A, B and C such that C = A*B. These parts have not been fixed since the
performance gain with respect to DenseRealMatrix are not very important, and the
numerical stability is poor.

This may well be due to a bad implementation.

This code has been put in the experimental directory for the record, putting it into
production would require solving all these issues.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@744126 13f79535-47bb-0310-9956-ffa450edef68
2009-02-13 14:38:48 +00:00
Phil Steitz 42b68a69ce Added correlation package, Covariance class. JIRA: MATH-114
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@743688 13f79535-47bb-0310-9956-ffa450edef68
2009-02-12 11:21:54 +00:00
William Barker 01f82aed42 remove eclipse generated equals since it doesn't work. Will add a working equals later
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@742837 13f79535-47bb-0310-9956-ffa450edef68
2009-02-10 03:02:38 +00:00
William Barker 01ff509885 Fis some problems with equals for OpenInttoDoubleHashmap.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@742445 13f79535-47bb-0310-9956-ffa450edef68
2009-02-09 12:41:20 +00:00
William Barker 7d4f6893f9 Mostly completing the methods that don't make sense if using a sparse vector in the first place. Initial implementations for equals on the backing store, but it seems it will need more work (since still have to comment out junit tests).
Making  checkVectorDimensions protected instead of public on all RealVector classes.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@742257 13f79535-47bb-0310-9956-ffa450edef68
2009-02-09 04:50:27 +00:00
Phil Steitz d22f9559e1 Exposed sums of squares.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@742145 13f79535-47bb-0310-9956-ffa450edef68
2009-02-08 19:30:09 +00:00