Description Usage Arguments Value References Examples
The singular value decomposition of a matrix X solves the equation X = UDV', where U is the matrix of left singular vectors, D is a diagonal matrix of singular values (δ), and V is a matrix of right singular vectors.
Note that U is equivalent to the eigenvectors of the matrix XX' and
V is equivalent to the eigenvectors of the matrix X'X. This implementation
of singular value decomposition has three main features:
The decomposition of X is sped up by first computing the SVD of either XX' (p>n) or X'X (p<n), rather than that of X. For the case of p>n, this is XX' = U D^2 U', and for the case of p<n, this is X'X = V D^2 V'. This respectively gives the left or right singular vectors. For p>n, the right singular vectors are then obtained via V = X'UD^-1, and for p<n the left singular vectors are obtained via U = X'VD^-1. The reason this approach improves speed of calculation for large data sets is that the SVD is only performed on a matrix with min(n,p) by min(n,p) dimensions, which can be substantially faster than performing SVD on a data set n by p dimensions.
The observations going into the SVD are allowed to be weighted. Currently weights on the variables are not implemented. The weighted left singular vectors are defined as Ω = W^-0.5U. The resulting singular values Δ are then the singular values of the weighted data matrix Φ, where Φ = Ω Δ V'.
Only the singular values and singular vectors corresponding to δ > tol, where tol is a tolerance for small values. Values less than or equal to tol are considered to be zero.
1 |
x |
a matrix |
weights |
row weights. defaults to equal weights and returns the typical SVD. |
method |
whether the divide and conquer ("dc") or standard ("std") algorithm should be used for the SVD. |
tol |
tolerance for small singular values. values <= tol are considered zero and truncated. |
a list
Abdi, H. (2007) Singular Value Decomposition (SVD) and Generalized Singular Value Decomposition (GSVD). Encyclopedia of Measurement and Statistics.
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.