View source: R/create_subspace.R
create_subspace | R Documentation |
This function calculates scaled eigenvalues and eigenvectors of x matrix.
create_subspace( x, components = NULL, decomposition = c("svd", "eigen"), verbose = FALSE, ... )
x |
A numeric real-valued matrix with n number of samples and p number of features. If p > n, a warning message is generated and the transpose of x is used. |
components |
A series of right singular vectors to estimate. Components must be smaller or equal to min(nrow(x), ncol(x)). |
decomposition |
The method to be used; method = "svd" returns results from singular value decomposition; method = "eigen" returns results from eigenvalue decomposition. |
verbose |
output message |
... |
Extra parameters |
Returns a list with entries:
The number of degrees of freedom of x.
The number of dimensions of x.
A series of right singular vectors estimated.
A logical value indicating whether the matrix x is transposed.
A data frame of scaled eigenvalues for specified components and corresponding dimensions.
A vector of scaled eigenvalues up to max(components).
Right singular vectors of x matrix for specified components.
Left singular vectors of x matrix or specified components.
x <- x_sim(n = 100, p = 150, ncc = 10, var = c(rep(10, 5), rep(1, 5))) x %>% create_subspace(components = 8:30) %>% str()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.