getRotationMatrix | R Documentation |
Extract the rotation matrix from dimRedResult
objects derived from PCA and FastICA
getRotationMatrix(x)
x |
of type |
The data has to be pre-processed the same way as the method does, e.g. centering and/or scaling.
a matrix
dat <- loadDataSet("Iris") pca <- embed(dat, "PCA") rot_pca <- getRotationMatrix(pca) scale(getData(dat), TRUE, FALSE) %*% rot_pca - getData(getDimRedData(pca)) if(requireNamespace("fastICA", quietly = TRUE)) { ica <- embed(dat, "FastICA") rot_ica <- getRotationMatrix(ica) scale(getData(dat), TRUE, FALSE) %*% rot_ica - getData(getDimRedData(ica)) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.