You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Kim van der Linde <ki...@kimvdlinde.com> on 2005/10/02 03:05:32 UTC

[Math] SingularValueDecomposition test case

Hi All,

In the past, I have plugged the JAMA SVD class to the matrix class of 
commons.math. I do now want to run a test in it, so, the questio 
becomes, does someone has a known test case for me?

Cheers,

Kim
-- 
http://www.kimvdlinde.com

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [Math] SingularValueDecomposition test case

Posted by Kim van der Linde <ki...@kimvdlinde.com>.
Hi Phil and Al,

Thanks for the advise. I have digged through it, and the code seems fine 
with many matrices.

Kim
-- 
http://www.kimvdlinde.com

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [Math] SingularValueDecomposition test case

Posted by Phil Steitz <ph...@gmail.com>.
Other than published examples or examples worked by hand, one thing
that I have found useful is to compute target values using R (which I
think does SVD), mathematica or other packages.  That is obviously not
infallible, but often brings bugs to the surface.  Sometimes you can
also use known analytical properties of the result to validate it
(like what Al is suggesting).  I haven't looked at SVD in a while, but
there are likely other things that can be done there as well.  Also,
it is good to include examples that are known to be numerically
challenging, ideally ones with analytical solutions that you know in
advance.  Sorry, but I don't have any of this at the ready for SVD. 
Poke about in the numerical linear algebra literature and you will
likely find some good examples and boundary cases.

Thanks for working on this.

Phil

On 10/1/05, Kim van der Linde <ki...@kimvdlinde.com> wrote:
> Hi All,
>
> In the past, I have plugged the JAMA SVD class to the matrix class of
> commons.math. I do now want to run a test in it, so, the questio
> becomes, does someone has a known test case for me?
>
> Cheers,
>
> Kim
> --
> http://www.kimvdlinde.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [Math] SingularValueDecomposition test case

Posted by Al Chou <ho...@yahoo.com>.
Never having used or even learned anything in detail about SVD, my only
suggestion is that equations 2.6.1 and 2.6.4 in
http://library.lanl.gov/numerical/bookcpdf/c2-6.pdf are, as the text therein
says, the only defining requirements for the SVD of any matrix.  You could, as
the text says, verify that the calculated SVD is correct by making up any
matrix and checking whether the two above equations hold for the SVD you get
out of your code.

Al


--- Kim van der Linde <ki...@kimvdlinde.com> wrote:
> Hi All,
> 
> In the past, I have plugged the JAMA SVD class to the matrix class of 
> commons.math. I do now want to run a test in it, so, the questio 
> becomes, does someone has a known test case for me?
> 
> Cheers,
> 
> Kim
> -- 
> http://www.kimvdlinde.com


		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org