MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: sporadic failure of SingularValueDecomposition[] in Mathematica 5.2

  • To: mathgroup at smc.vnet.net
  • Subject: [mg60665] Re: [mg60563] sporadic failure of SingularValueDecomposition[] in Mathematica 5.2
  • From: John Sidles <sidles at u.washington.edu>
  • Date: Fri, 23 Sep 2005 04:20:17 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Dear MathGroup folks

I am continuing my investigations of sporadic failure of
SingularValueDecomposition[], as initially documented
in this notebook:

    http://faculty.washington.edu/sidles/mma_svd_failure_example/

I have now generated several dozen examples of matrices that fail,
and I have checked that these matrices also fail for the following
basic linear algebra routines (which derive from the SVD):

    PseudoInverse[]
    NullSpace[]
    MatrixRank[]

Presumably, this means that most of Mathematica's least-mean-square
packages -- all of which use the SVD intensively -- are at risk for
these failing matrices.

When I perturb the failing matrices by $MachinePrecision, then
sometimes SingularValueDecomposition[] succeeds, sometimes
it fails (returning a wrong answer), and sometimes it returns
SingularValueDecomposition[__] as an unevaluated quantity,
accompanied by the following (undocumented) error message:

   SingularValueDecomposition::cfail: Algorithm failed to converge.

Has any else ever seen this "cfail" message?  According to Press
et al. "Numerical Recipes", an SVD is supposed to *always* exist,
and many statistical analysis packages assume that this is so.

I am preparing more extensive documentation, including a script
that generates large numbers of failing SVD matrices.

Interestingly, computing the SVD of these matrices fails under
OS X 10.4.3 (Tiger) on both PowerBook G4s and Dual Processor G5s.
But it did *not* fail on a PowerBook G4 running 10.3.9 (Panther).

Sincerely ... John Sidles




  • Prev by Date: Re: Beginner: Importing files, maintaining file format.
  • Next by Date: Re: Vectorization
  • Previous by thread: Re: sporadic failure of SingularValueDecomposition[] in Mathematica 5.2
  • Next by thread: "layering" 2d plots