[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 3.2.3 RC2
From: |
Dmitri A. Sergatskov |
Subject: |
Re: 3.2.3 RC2 |
Date: |
Wed, 2 Sep 2009 13:39:49 -0500 |
On Wed, Sep 2, 2009 at 1:29 PM, John W. Eaton<address@hidden> wrote:
> The test is:
>
> n = 100;
> k = 7;
> a =
> sparse([3:n,1:n,1:(n-2)],[1:(n-2),1:n,3:n],[ones(1,n-2),0.4*n*ones(1,n),ones(1,n-2)]);
> [u,s,v] = svd(full(a));
> s = diag(s);
> [dum, idx] = sort(abs(s));
> s = s(idx);
> u = u(:,idx);
> v = v(:,idx);
> [u2,s2,v2,flag] = svds(a,k,0);
> s2 = diag(s2);
> assert(flag,!1);
> assert(s(k:-1:1), s2, 1e-10);
>
> If you run this repeatedly, do you see some successes and some
> failures? If it does fail, do you see that the first assert sometimes
> fails, and other times it is the second?
It is alway seems to be in the second, but I get different warnings from
time to time. Most often it is:
warning: returning fewer singular values than requested
warning: try increasing the value of sigma
error: assert (s (k:-1:1),s2,1e-10) expected
38.034
38.034
38.015
38.015
38.004
38.004
but got
38.060
38.034
38.034
38.015
38.015
38.004
38.004
Dimensions don't match
but sometimes it is just:
error: assert (s (k:-1:1),s2,1e-10) expected
38.060
38.060
38.034
38.034
38.015
38.015
38.004
but got
38.060
38.034
38.034
38.015
38.015
38.004
38.004
maximum absolute error 0.0263523 exceeds tolerance 1e-10
>
> I have not tried to debug the problem yet.
>
> David, I'm copying you because you wrote svds and might be able to see
> the problem and perhaps a fix more quickly than I could.
>
> Thanks,
>
> jwe
>
Dmitri.
--
- 3.2.3 RC2, Jaroslav Hajek, 2009/09/01
- Re: 3.2.3 RC2, Tatsuro MATSUOKA, 2009/09/01
- Re: 3.2.3 RC2, Benjamin Lindner, 2009/09/01
- Re: 3.2.3 RC2, Dmitri A. Sergatskov, 2009/09/01
- Re: 3.2.3 RC2, Marco Atzeri, 2009/09/01
- Re: 3.2.3 RC2, Dmitri A. Sergatskov, 2009/09/01
- Re: 3.2.3 RC2, John W. Eaton, 2009/09/02
- Re: 3.2.3 RC2,
Dmitri A. Sergatskov <=
- Re: 3.2.3 RC2, David Bateman, 2009/09/03
- Re: 3.2.3 RC2, Marco Atzeri, 2009/09/03
- Re: 3.2.3 RC2, Tatsuro MATSUOKA, 2009/09/01
- Re: 3.2.3 RC2, Tatsuro MATSUOKA, 2009/09/01
Re: 3.2.3 RC2, John W. Eaton, 2009/09/01
Re: 3.2.3 RC2, Tatsuro MATSUOKA, 2009/09/01