Description Usage Arguments Value Author(s) See Also Examples
View source: R/tolerance_svd.R
tolerance_svd
eliminates likely spurious components: any eigenvalue (squared singular value) below a tolerance level is elminated.
The (likely) spurious singular values and vectors are then eliminated from $u
, $d
, and $v
.
Additionally, all values in abs($u)
or abs($v)
that fall below the tol
are set to 0.
The use of a real positive value for tol
will eliminate any small valued components.
With tol
, tolerance_svd
will stop if any singular values are complex or negative.
1 |
x |
A data matrix of size for input to the singular value decomposition ( |
nu |
The number of left singular vectors to be computed. Default is |
nv |
The number of right singular vectors to be computed. Default is |
tol |
Default is |
A list with three elements (like svd
):
d |
A vector containing the singular values of x > |
u |
A matrix whose columns contain the left singular vectors of x, present if nu > 0. Dimension |
v |
A matrix whose columns contain the right singular vectors of x, present if nv > 0. Dimension |
Derek Beaton
1 2 3 4 5 | data(wine)
X <- scale(as.matrix(wine$objective))
s_asis <- tolerance_svd(X)
s_.Machine <- tolerance_svd(X, tol= .Machine$double.eps)
s_000001 <- tolerance_svd(X, tol=.000001)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.