equilibrate | R Documentation |
Equilibrate a rectangular or symmetric matrix using 2-norm.
equilibrate(x, scale = TRUE)
x |
a numeric matrix. |
scale |
a logical value, |
For scale = TRUE
, the equilibrated matrix. The scalings and an approximation
of the condition number, are returned as attributes "scales"
and "condition"
.
If x
is a rectangular matrix, only the columns are equilibrated.
x <- matrix(c(1, 1, 1,
1, 2, 1,
1, 3, 1,
1, 1,-1,
1, 2,-1,
1, 3,-1), ncol = 3, byrow = TRUE)
z <- equilibrate(x)
apply(z, 2, function(x) sum(x^2)) # all 1
xx <- crossprod(x)
equilibrate(xx)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.