I'm running PCA in h2o (R version) and was wondering whether it's possible to specify/apply a rotation (like oblimin or promax). I'm looking for the rotated loadings, and the reason I'm using h2o instead of other common packages for that (like "psych") is that my data set is huge (100000 columns) so I need to take advantage of h2o's nice parallel computing in Windows. The code I'm using currently is:
library(h2o)
h2o.init(nthreads=64)
x <- read.csv("file_with_100000_columns.csv")
for (i in 1:ncol(x)) {x[,i] <- as.factor(x[,i])}
x <- as.h2o(x)
mod <- h2o.prcomp(training_frame=x,k=5,use_all_factor_levels=TRUE)
Thanks!
Currently PCA does not support any rotation. All it does is to decompose your datasets into factors and its corresponding coefficients in those factor directions.
Given a dataset A of m rows by n predictors (or coordinates), PCA will do the following
A = X*D where X is m by k, D is k by n and k < n.
I assume when you say you want to specify a rotation, you really wanted
A = Y*E where Y is m by k, E is k by n and E is given.
I believe you can solve the problem by doing the following: :
Hope this helps.