IterativeSolvers.jl
IterativeSolvers.jl copied to clipboard
incorrect singular values from svdl?
SVDL returns radically different answers than SVD for the case generated by the test case, below. assuming that the two algorithms are equivalent.
using IterativeSolvers
M = zeros(110,22);
M[:,1] = ones(110); M[:,2] = repeat(1:11,outer=10);
offset = 0; indx = 1:11;
for i = 3:2:21
M[offset+indx,i] = ones(11);
M[offset+indx,i+1] = indx;
offset += 11;
end
svd(M)[2]
svdl(M)[1]
svdl(M,22)[1]
svdl(sparse(M),22)[1]
The algorithms aren't equivalent. svd isn't iterative and is more stable than svdl. I think svdl doesn't work well with many repeated singular values. I cannot really judge whether the method is unstable or has a bug.