fast.svd
returns the singular value decomposition of
a rectangular real matrix
$$M = U D V^{'},$$
where \(U\) and \(V\) are orthogonal matrices with \(U' U = I\)
and \(V' V = I\), and \(D\) is a diagonal matrix containing the
singular values (see svd
).
The main difference to the native version svd
is that
fast.svd
is substantially faster for "fat" (small n, large p)
and "thin" (large n, small p) matrices.
In this case the decomposition of \(M\) can be
greatly sped up by first computing the SVD of either \(M M'\) (fat matrices) or
\(M' M\) (thin matrices), rather than that of \(M\).
A second difference to svd
is that fast.svd
only
returns the positive singular values (thus the dimension of \(D\)
always equals the rank of \(M\)). Note that the singular
vectors computed by fast.svd
may differ in sign from those computed
by svd
.