You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
Here there's a small snippet:
public void testCompareSVDResults() {
int m = 5, n = 4;
Random generator = new Random();
Matrix mat = new ArrayMatrix(m, n);
for (int i = 0; i < m; ++i) {
for (int j = 0; j < n; ++j) {
mat.set(i, j, Math.abs(generator.nextDouble()) % 100);
}
}
List<SVD.Algorithm> algorithms = new LinkedList<SVD.Algorithm>();
algorithms.add(SVD.Algorithm.COLT);
algorithms.add(SVD.Algorithm.JAMA);
algorithms.add(SVD.Algorithm.SVDLIBJ);
for (Algorithm algorithm : algorithms) {
System.out.println("Algorithm is: " + algorithm);
Matrix[] svd = SVD.svd(mat, algorithm, Math.min(m, n));
Matrix vt = svd[2];
System.out.println("V^t is:");
System.out.println(toString(vt));
}
}
What is the expected output? What do you see instead?
Algorithm is: COLT
V^t is:
[[0.537,0.522,0.351,0.562]
[0.437,0.220,-0.869,-0.078]
[0.624,-0.130,0.343,-0.690]
[0.363,-0.814,-0.065,0.449]
]
Algorithm is: JAMA
V^t is:
[[0.537,0.437,0.624,0.363]
[0.522,0.220,-0.130,-0.814]
[0.351,-0.869,0.343,-0.065]
[0.562,-0.078,-0.690,0.449]
]
Algorithm is: SVDLIBJ
V^t is:
[[0.537,0.437,0.624,0.363]
[0.522,0.220,-0.130,-0.814]
[-0.351,0.869,-0.343,0.065]
[-0.562,0.078,0.690,-0.449]
]
What version of the product are you using? On what operating system?
I'm on Debian GNU/Linux, using a version obtained from the SVN repository on 14
Jul 2010
Original issue reported on code.google.com by [email protected] on 15 Jul 2010 at 10:36
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 15 Jul 2010 at 10:36The text was updated successfully, but these errors were encountered: