random.subspace | R Documentation |
Random projections to a lower dimension subspace (random subspace method) The projection is performed randomly selecting a subset of variables (components) and then projecting the data onto the selected components. It is the projection used by Ho for her Random subspace ensemble algorithm.
random.subspace(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 |
Random Subspace (RS) are randomized maps represented by d' \times d
matrices R =\sqrt{d/d'}
(r_{ij})
, where r_{ij}
are uniformly chosen with entries in \{0,1\}
,
and with exactly one 1 per row and at most one 1 per column (d'
is the
dimension of the projected space and d
the dimension of the original space).
It is worth noting that, in this case,
the "compressed" data set D_R = R D
can be quickly computed in time \mathcal{O}(n d')
, independently from
d
.
data matrix (dimension d X ncol(m)) of the examples projected in a d-dimensional random subspace
Giorgio Valentini valentini@di.unimi.it
T.Ho, The random subspace method for constructing decision forests, IEEE Transactions on Pattern Analysis and Machine Intelligence 20 (8) (1998) 832-844.
Plus.Minus.One.random.projection
, norm.random.projection
,
Achlioptas.random.projection
# Random subspace projection from a 1000 dimensional space
# to a 50-dimensional subspace
m <- matrix(runif(10000), nrow=1000)
m.p <- random.subspace(d = 50, m, scaling = TRUE)
# Random subspace projection from a 10000 dimensional space
# to a 1000-dimensional subspace
m <- matrix(rnorm(500000), nrow=5000)
m.p <- random.subspace(d = 1000, m, scaling = TRUE)
# The same as above without scaling
m <- matrix(rnorm(500000), nrow=5000)
m.p <- random.subspace(d = 1000, m, scaling = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.