|View source on GitHub|
Implementation of the modified Gram-Schmidt orthonormalization algorithm.
tfp.substrates.numpy.math.gram_schmidt( vectors, num_vectors=None )
We assume here that the vectors are linearly independent. Zero vectors will be
left unchanged, but will also consume an iteration against
From : "MGS is numerically equivalent to Householder QR factorization applied to the matrix A augmented with a square matrix of zero elements on top."
Historical note, see : "modified" Gram-Schmidt was derived by Laplace , for elimination and not as an orthogonalization algorithm. "Classical" Gram-Schmidt actually came later . Classical Gram-Schmidt has a sometimes catastrophic loss of orthogonality for badly conditioned matrices, which is discussed further in .
 Bjorck, A. (1994). Numerics of gram-schmidt orthogonalization. Linear Algebra and Its Applications, 197, 297-316.
 P. S. Laplace, Thiorie Analytique des Probabilites. Premier Supple'ment, Mme. Courtier, Paris, 1816.
 E. Schmidt, über die Auflosung linearer Gleichungen mit unendlich vielen Unbekannten, Rend. Circ. Mat. Pulermo (1) 25:53-77 (1908).
A Tensor of shape