Apache Commons Math Changelog

What's new in Apache Commons Math 3.2

Jul 24, 2013
  • New features:
  • MATH-917,MATH-918,MATH-919,MATH-920: All contents of package "o.a.c.m.stat.clustering" refactored into
  • new package "o.a.c.m.ml.clustering" and added support for additional
  • distance measures in package "o.a.c.m.ml.distance": "CanberraDistance",
  • "ChebyshevDistance", "EuclideanDistance" and "ManhattanDistance". Thanks to Reid Hochstedler.
  • MATH-817: Added Multivariate Normal Mixture Model Fitting by Expectation Maximization. Thanks to Jared Becksfort.
  • MATH-811: Added a way to trigger only increasing or decreasing events in ODE integration.
  • MATH-946: Added array-scaling methods to MathArrays. Thanks to Jared Becksfort.
  • MATH-460: Added the Lévy distribution. Thanks to Andrew Waterman.
  • MATH-948: Implementations for inverse error function and inverse complementary
  • error functions have been added.
  • MATH-845: Added utilities for prime numbers. Thanks to Sébastien Riou.
  • MATH-914: Check bounds in multi-start vector optimizers.
  • MATH-941: Added discrete distributions. Thanks to Piotr Wydrych.
  • Added Hermite interpolator for RealFieldElement instances.
  • Added RealFieldElement interface to represent anything that is real number like, implemented by both Decimal64, Dfp and DerivativeStructure.
  • Added partial derivatives computation for 3D vectors and rotations.
  • Added accurate linear combination of DerivativeStructure instances,avoiding cancellation.
  • Added conversion of gradients and Hessians from spherical to Cartesian coordinates in 3D.
  • Fixed Bugs:
  • MATH-961: Fixed wrong array dimensions in secondary equations handling in some cases.
  • MATH-960: Fixed missing side effects of secondary equations on main state in
  • Ordinary Differential Equations integration.
  • MATH-957: Fixed inverse cumulative probability for uniform distribution. Thanks to Evan Ward.
  • MATH-891: "SpearmansCorrelation" now works correctly in case of a provided
  • "NaturalRanking" with a "NaNStrategy.REMOVED" strategy and the input
  • data contains NaN values. From version 4.0 onwards this strategy will
  • not be supported anymore.
  • MATH-934: Fixed Complex.reciprocal() for zero argument.
  • MATH-862: AbstractRealMatrix will now check for rectangular input arrays in
  • its copySubMatrix methods.
  • MATH-949: Increment iteration counter in optimization algorithms.
  • MATH-950: Fixed missing update in ODE event handlers, when a RESET_STATE is triggered.
  • MATH-947: Fixed infinite loop when NaN occurs in singular value decomposition.
  • MATH-580: Extended ranges for FastMath performance tests.
  • MATH-925: Finalized implementation of diagonal matrix.
  • MATH-630: Added rank revealing QR decomposition. Thanks to Christopher Nix.
  • MATH-570: ArrayFieldVector can now be constructed from any FieldVector. Thanks to Arne Plöse.
  • MATH-861: Improved checking of null vector elements. Thanks to Sébastien Brisard.
  • MATH-936: Fixed generation of long random numbers between two bounds.
  • MATH-942: Fixed creation of generic array. Thanks to Piotr Wydrych.
  • MATH-940: Fixed abstract test class naming that broke ant builds. Thanks to Piotr Wydrych.
  • MATH-939: Allow covariance to be computed for one-dimensional variables. Thanks to Piotr Wydrych.
  • MATH-938: Fixed accuracy of 3D Line.revert().
  • MATH-937: Improved javadoc to explain how switching functions should
  • behave across events in ODE events detection.
  • MATH-935: Fixed DerivativeStructure.atan2 for special cases when both arguments are +/-0.
  • MATH-930: Improved class javadoc wrt convergence criteria and added
  • additional constructors to override the default epsilon and cut-off
  • values in class "SimplexSolver".
  • MATH-929: Fixed truncated value in "MultivariateNormalDistribution". Thanks to Piotr Wydrych.
  • MATH-927: Made "BitStreamGenerator" implement the "Serializable" interface. Thanks to Dennis Hendriks.
  • Changes:
  • MATH-956: Replaced hard-coded numbers in "LevenbergMarquardtOptimizer".
  • MATH-955: Fixed loading of test file when path contains a space. Thanks to Evan Ward.
  • MATH-954: Improved speed of FastMath.abs methods for all signatures, by removing branching. Thanks to Charles Cooper.
  • MATH-953: Improved speed of several FastMath methods. Thanks to Charles Cooper.
  • MATH-951: Improved speed of FastMath copysign methods. Thanks to Charles Cooper.
  • MATH-671: Made EmpiricalDisribution smoothing kernel pluggable.
  • MATH-877: Allow direct use of SummaryStatistics in one-way ANOVA. Thanks to Peter Andrews.
  • Normal distribution now uses a direct implementation of the
  • inverse error function to compute inverse cumulative probability
  • instead of relying on a numerical solver. This is much faster,
  • more accurate and does not need convergence threshold.
  • MATH-933: Throw "MathUnsupportedOperationException" from optimizers that do
  • not support constraints (previous behaviour was to silently ignore
  • the "SimpleBounds" argument).
  • MATH-931: Greater efficiency in "UnitSphereRandomVectorGenerator".

New in Apache Commons Math 2.2 (Dec 28, 2011)

  • New features:
  • MATH-364: Added complementary error function, erfc. Thanks tChristian Winter.
  • MATH-385: Added characteristic support tdistributions, including methods treturn numerical
  • estimates of the mean and variance and upper and lower bounds of support. In version 2.2,
  • methods returning distribution characteristics have been added only tthe implementation
  • classes. In version 3, supporting methods have been added tthe abstract base classes
  • and distribution interfaces.
  • MATH-440: Created "MathUserException" class tconvey cause of failure between
  • layers of user code separated by a layer of Commons-Math code.
  • MATH-419: Added new random number generators from the Well Equidistributed Long-period Linear (WELL).
  • MATH-412: Added the dfp library providing arbitrary precision floating point computation in the spirit of
  • IEEE 854-1987 (not exactly as it uses base 1000 instead of base 10). In addition tfinite numbers,
  • infinities and NaNs are available (but there are nsubnormals). All IEEE 854-1987 rounding modes and
  • signaling flags are supported. The available operations are +, -, *, / and the available functions
  • are sqrt, sin, cos, tan, asin, acos, atan, exp, log. Thanks tBill Rossi.
  • MATH-375: Added faster and more accurate version of traditional mathematical functions in a FastMath
  • class intended tbe a drop-in replacement for java.util.Math at source-level. Some functions
  • still directly delegates tMath but this will improve with time. Some functions like exp
  • may be twice as fast (even 3 times faster on some processors). Sine, cosine or power functions
  • show typical speedups of 1.5 times faster or more. Thanks tBill Rossi.
  • MATH-400: Added support for Gaussian curve fitting. Thanks tJ. Lewis Muir.
  • MATH-388: Added a feature allowing error estimation tbe computed only on a subset of
  • Ordinary Differential Equations, considered as the main set, the remaining equations
  • being considered only as an extension set that should not influence the ODE integration
  • algorithm
  • MATH-379: Created "MultidimensionalCounter" class.
  • MATH-378: Implementation of linear interpolation. Thanks tMatthew Rowles.
  • MATH-370: Added new "equalsIncludingNaN" methods that have the same semantics as the old "equals" methods.
  • The semantics of the old methods will be modified (in the next major release) such that
  • NaNs are not considered equal (tbe more compliant with IEEE754).
  • MATH-366: Implementation of tricubic interpolation.
  • Fixed Bugs:
  • MATH-505: TestUtils is thread-hostile. Deprecate the getters and setters.
  • MATH-471: MathUtils.equals(double, double) does not work properly for floats
  • - add equivalent (float, float) methods and basic tests
  • MATH-467: Fixed an awkward statement that triggered a false positive warning.
  • MATH-456: Modified erf (and erfc) treturn extreme values for x with abs(x) > 40.
  • For these arguments, the true value is indistinguishable from an extrema as a double.
  • MATH-414: Modified NormalDistributionImpl.cumulativeProbability treturn 0 or 1,
  • respectively for values more than 40 standard deviations from the mean.
  • For these values, the actual probability is indistinguishable from 0 or 1
  • as a double. Top coding improves performance for extreme values and prevents
  • convergence exceptions.
  • MATH-380: Deprecated the whole ode.jacobians package. It is clumsy and difficult tuse. It will
  • be replaced by a completely rewritten implementation in 3.0, which will be more tightly
  • bound tthe top level ode package
  • MATH-426: Added a normalization feature ttransform samples sthey have zermean and unit standard deviation Thanks tErik van Ingen.
  • MATH-429: Fixed k-means++ tadd several strategies tdeal with empty clusters that may appear
  • during iterations
  • MATH-391: Fixed an error preventing zerlength vectors tbe built by some constructors
  • MATH-421: Fixed an error preventing ODE solvers tbe restarted after they have been stopped by a discrete event
  • MATH-415: Fixed lost cause in MathRuntimeException.createInternalError. Note that the message is still the default
  • message for internal errors asking treport a bug tcommons-math JIRA tracker. In order tretrieve
  • the message from the root cause, one has tget the cause itself by getCause().
  • MATH-411: Modified multiple regression newSample methods tensure that by default in all cases,
  • regression models are estimated with intercept terms. Prior tthe fix for this issue,
  • newXSampleData(double[][]), newSampleData(double[], double[][]) and
  • newSampleData(double[], double[][], double[][]) all required columns of "1's" tbe inserted
  • intthe x[][] arrays tcreate a model with an intercept term; while newSampleData(double[], int, int)
  • created a model including an intercept term without requiring the unitary column. All methods have
  • been changed teliminate the need for users tadd unitary columns tspecify regression models.
  • Users of OLSMultipleLinearRegression or GLSMultipleLinearRegression versions 2.0 or 2.1 should either
  • verify that their code either does not use the first set of data loading methods above or set the noIntercept
  • property ttrue on estimated models tget the previous behavior.
  • MATH-386: Added R-squared and adjusted R-squared statistics tOLSMultipleLinearRegression.
  • MATH-392: Corrected the formula used for Y variance returned by calculateYVariance and associated
  • methods in multiple regression classes (AbstractMultipleLinearRegression,
  • OLSMultipleLinearRegression, GLSMultipleLinearRegression). These methods previously returned
  • estimates of the variance in the model error term. New "calulateErrorVariance" methods have
  • been added tcompute what was previously returned by calculateYVariance. Thanks tMark Devaney.
  • MATH-406: Bug fixed in Levenberg-Marquardt (handling of weights).
  • MATH-405: Bug fixed in Levenberg-Marquardt (consistency of current).
  • MATH-377: Bug fixed in chi-square computation in AbstractLeastSquaresOptimizer.
  • MATH-395: Fixed several bugs in "BrentOptimizer".
  • MATH-393: Fixed inconsistency in return values in "MultiStartUnivariateRealOptimizer".
  • MATH-382: Fixed bug in precondition check (method "setMicrosphereElements").
  • MATH-361: Improved localization of error messages.
  • MATH-376: Allow multiple optimizations with a default simplex.
  • MATH-352: Added a setQRRankingThreshold method tLevenberg-Marquardt optimizer timprove robustness
  • of rank determination.
  • MATH-362: Fixed Levenberg-Marquardt optimizer that did not use the vectorial convergence checker.
  • Now this optimizer can use either the general vectorial convergence checker or its own
  • specialized convergence settings.
  • MATH-371: Fixed loss of significance error in PersonsCorrelation p-value computation causing p-values
  • smaller than the machine epsilon (~1E-16) tbe reported as 0. Thanks tKevin Childs.
  • MATH-369: Fix NullPointerException in BisectionSolver.solve(f, min, max, initial) Thanks tSasun Pundev.
  • MATH-368: Fix spelling of getSparcity [sic] method of OpenMapRealVector
  • MATH-367: Fix problem with the default sparseIterator when a RealVector has exactly one non-zerentry Thanks tAlbert Huang.
  • Changes:
  • MATH-384: Added a constructor and addValues(double[]) methods allowing DescriptiveStatistics to
  • be initialized with values from a double[] array. Similarly enhanced
  • ResizeableDoubleArray.
  • MATH-448: Added a getUniqueCount() method tFrequency treturn the number of unique
  • values included in the frequency table. Thanks tPatrick Meyer.
  • MATH-420: Added toString() override tStatisticalSummaryValues.
  • MATH-417: Improved Percentile performance by using a selection algorithm instead of a
  • complete sort, and by allowing caching data array and pivots when several
  • different percentiles are desired
  • MATH-409: Made intercept / nintercept configurable in multiple regression classes. By default, regression
  • models are estimated with an intercept term. When the "noIntercept" property is set to
  • true, regression models are estimated without intercepts.
  • MATH-361: Created package "exception" tcontain the new exceptions hierarchy.
  • Created package "exception.util": utilities for the exception classes
  • (e.g. managing the localization of error messages).
  • Default policy for dealing with invalid null references: raise a
  • "NullArgumentException" (subclass of "IllegalArgumentException").
  • MATH-310: Added random data generation methods tRandomDataImpl for the remaining distributions in the
  • distributions package. Added a generic nextInversionDeviate method that takes a discrete
  • or continuous distribution as argument and generates a random deviate from the distribution.
  • Alsadded sampling methods based on the implementations in RandomDataImpl tdistributions.
  • MATH-365: Deprecated SmoothingBicubicSplineInterpolator and SmoothingBicubicSplineInterpolatorTest.
  • Added BicubicSplineInterpolator and BicubicSplineInterpolatorTest.
  • Added SmoothingPolynomialBicubicSplineInterpolator and SmoothingPolynomialBicubicSplineInterpolatorTest.
  • Added method tclear the list of observations in PolynomialFitter.