Plus.Minus.One.random.projection | R Documentation |
Random projections to a lower dimensional subspace with a random +1/-1 projection matrix The projection is performed using a projection matrix R s.t. Prob(R[i,j]=1)=Prob(R[i,j]=-1)=1/2.
Plus.Minus.One.random.projection(d = 2, m, scaling = TRUE)
d |
subspace dimension |
m |
data matrix (rows are features and columns are examples) |
scaling |
if TRUE (default) scaling is performed |
Plus-Minus-One (PMO) random projections are
represented by d'\times d
matrices R = 1/\sqrt{d'} (r_{ij})
, where r_{ij}
are uniformly chosen in \{-1,1\}
, such that Prob(r_{ij} = 1) = Prob(r_{ij} = -1) = 1/2
.
data matrix (dimension d X ncol(m)) of the examples projected in a d-dimensional random subspace
Giorgio Valentini valentini@di.unimi.it
random.subspace
, norm.random.projection
,
Achlioptas.random.projection
# PMO projection from a 1000 dimensional space to a 50-dimensional subspace
m <- matrix(runif(10000), nrow=1000)
m.p <- Plus.Minus.One.random.projection(d = 50, m, scaling = TRUE)
# PMO projection from a 10000 dimensional space to a 1000-dimensional subspace
m <- matrix(rnorm(500000), nrow=5000)
m.p <- Plus.Minus.One.random.projection(d = 1000, m, scaling = TRUE)
# The same as above without scaling
m <- matrix(rnorm(500000), nrow=5000)
m.p <- Plus.Minus.One.random.projection(d = 1000, m, scaling = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.