Open GoogleCodeExporter opened 9 years ago
I have another example, hope it helps:
What steps will reproduce the problem?
1. Create a matrix file (cluto format) containing:
5 7
1 1 0 0 0 0 1
0 1 1 0 0 0 0
1 0 0 0 0 0 0
0 0 0 1 1 1 0
0 0 0 1 0 1 1
2. Run the following Java code:
Matrix[] result = SVD.svd(new File("samplematrix.cluto"), Algorithm.SVDLIBJ,
Format.CLUTO_DENSE, 2);
Matrix U = result[0];
Matrix S = result[1];
Matrix Vt = result[2];
Matrix C = Matrices.multiply(S, Vt);
MatrixIO.writeMatrix(C, new File("c.cluto"), Format.CLUTO_DENSE);
What is the expected output? What do you see instead?
The expected output is:
2 5
0.89453775 0.27084422 0.20789784 1.3732798 1.5811776
-1.4221323 -0.8210684 -0.52053654 0.8210684 0.3005319
The output was:
2 5
0.13197954 0.8717977 1.0037771 0.56787837 0.17193973
0.542207 0.19846153 -0.93913 -0.542207 -0.34374544
What version of the product are you using? On what operating system?
I am using svd.jar (May 2010) on Ubuntu Linux 10.04
Please provide any additional information below.
I've also checked the same code with SVDLIBC and it worked fine.
Original comment by alpgar...@gmail.com
on 16 Feb 2011 at 6:32
Attachments:
Original issue reported on code.google.com by
b...@sussex.ac.uk
on 26 Aug 2010 at 2:24