# commons-dev mailing list archives

##### Site index · List index
Message view
Top
From "Remi Arntzen (JIRA)" <j...@apache.org>
Subject [jira] Updated: (MATH-157) Add support for SVD.
Date Wed, 01 Nov 2006 04:05:17 GMT
```     [ http://issues.apache.org/jira/browse/MATH-157?page=all ]

Remi Arntzen updated MATH-157:
------------------------------

Attachment: svd.tar.gz

This is just  a preliminary implementation.

Seeing as how I have not taken a course in linear algebra as of yet, I would appreciate having
some test cases to verify my code against.  In particular any special cases involved in the
algorithm, e.g. singular square non-square, as far as I can tell my method should work on
all matrix inputs, but no guarantees.

My method involves finding the eigen values by using the QR algorithm, taking the square roots
of these values and placing them along the diagonal of Σ.  Then I compute the eigen vectors
of mTm and mmT by computing the null space of these matrices ( with the difference of the
Identity*eigen value), and in calculating the null space I used the reduced row echelon form
via the Gaussian algorithm.

This is just a start, still needs provide more documentation, and test cases.

> --------------------
>
>                 Key: MATH-157
>                 URL: http://issues.apache.org/jira/browse/MATH-157
>             Project: Commons Math
>          Issue Type: New Feature
>            Reporter: Tyler Ward
>         Attachments: svd.tar.gz
>
>
> SVD is probably the most important feature in any linear algebra package, though also
one of the more difficult.
> In general, SVD is needed because very often real systems end up being singular (which
can be handled by QR), or nearly singular (which can't). A good example is a nonlinear root
finder. Often the jacobian will be nearly singular, but it is VERY rare for it to be exactly
singular. Consequently, LU or QR produces really bad results, because they are dominated by
rounding error. What is needed is a way to throw out the insignificant parts of the solution,
and take what improvements we can get. That is what SVD provides. The colt SVD algorithm has
a serious infinite loop bug, caused primarily by Double.NaN in the inputs, but also by underflow
and overflow, which really can't be prevented.
> If worried about patents and such, SVD can be derrived from first principals very easily
with the acceptance of two postulates.
> 1) That an SVD always exists.
> 2) That Jacobi reduction works.
> Both are very basic results from linear algebra, available in nearly any text book. Once
that's accepted, then the rest of the algorithm falls into place in a very simple manner.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-