[SciPy-user] Gram-Schmidt orthogonalization

Anne Archibald aarchiba@physics.mcgill...
Mon Nov 24 14:19:54 CST 2008

2008/11/24 nicky van foreest <vanforeest@gmail.com>:

> I recall from the book numerical recipes that the Gramm Schmidt
> methods works terrible, numerically speaking. They provide some
> counterexamples too. It is better to use singular value decomposition,
> which is included in scipy too.

There are situations where the SVD won't cut it: for example, if you
want to construct a custom family of orthogonal polynomials, ensuring
that the nth has degree n. But I think in general you can use QR
decomposition for these sorts of problems, or possibly Cholesky
factorization. It's still a little shaky numerically, but it gets the
job done.


More information about the SciPy-user mailing list