A naive implementation of Python sklearn's random projections in R. The package provides three functions: JohnsonLindenstraussMinDim
, GenerateGaussianRandomProj
, RandomProjection
.
library(devtools)
install_github("chappers/randomProjection")
X <- rnorm(1000000)
dim(X) <- c(100, 10000)
X_new <- RandomProjection(X)
dim(X_new$RP) # 100 7894
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.