IterativeSolvers.jl icon indicating copy to clipboard operation
IterativeSolvers.jl copied to clipboard

incorrect singular values from svdl?

Open protogeezer opened this issue 8 years ago • 1 comments

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]

protogeezer avatar Feb 09 '17 18:02 protogeezer

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.

haampie avatar Dec 06 '17 13:12 haampie