mirror of
https://github.com/apache/commons-math.git
synced 2025-02-11 12:36:05 +00:00
Luc Maisonobe
335572b99e
Prevent NaN to occur for singular matrices
Numerical inaccuracies in the underlying eigendecomposition could induce very small negative eigenvalues, so the square root produced NaNs. The eigenvalues really cannot be negative, so it is safe to replace the negative ones by 0. There are remaining problems with singular matrices: - the singular vectors also contain NaNs - the solver does not really work in least square sense and complain about singular matrices JIRA: MATH-320 git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@885279 13f79535-47bb-0310-9956-ffa450edef68
Description
Languages
Java
99.3%
R
0.5%