commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dimitri Pourbaix <>
Subject [math] Work going on on SVD
Date Sun, 31 Jan 2010 21:22:51 GMT

In its present form (CM2.0), SingularValueDecomposition suffers some
problems when the matrix is (numerically) singular.  Luc proposed a
way to improve the situation by limiting the singular values to non
zero ones.  Whereas the result is OK if someone is interested in getting
the singular values, it is not from a purely mathematical point of view.
Indeed, the resulting U matrix does no longer hold the right dimension.
Instead of a number of columns equal to the number of columns of the
original matrix, U now has as many columns as non-zero singular values.
The product U*S*V^T yields the original matrix but the wrong size might
put some users into trouble (that is true for the size of S as well).

I propose to compute U ... without taking advantage of V.  That means
calling EigenDecomposition a second time but should work even in case
of singular matrices.  That is the solution I am working on.  However,
doing so, I notice that EigenDecomposition also suffers major problems
in case of singular matrices.  A 3x3 singular matrix where 0 is an
eigen value with multiplicity 2 ... yields only 2 distinct eigen
vectors.  The vectors associated to the null eigen value are equal!!

So, before I can improve SVD, I have to improve EigenDecomposition!

By the way, going through SVD, EigenDecomposition, I noticed that
BidiagonalTransformer and TridiagonalTransformer both use the
Householder vector computation deeply imbedded in their code.  In
order to make both classes easier to read (and to debug), I wonder
if it might be useful to introduce a class Householder which would
take care of the computation of the vector in a unique place.

Dimitri Pourbaix                         *
Institut d'Astronomie et d'Astrophysique *      Don't worry, be happy
CP 226, office 2.N4.211, building NO     *         and CARPE DIEM.
Universite Libre de Bruxelles            *
Boulevard du Triomphe                    *      Tel : +32-2-650.35.71
  B-1050 Bruxelles                        *      Fax : +32-2-650.42.26     *

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message