Learn R Programming

clusterv (version 1.1.1)

random.subspace: Random Subspace (RS) projections

Description

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.

Usage

random.subspace(d = 2, m, scaling = TRUE)

Value

data matrix (dimension d X ncol(m)) of the examples projected in a d-dimensional random subspace

Arguments

d

subspace dimension

m

data matrix (rows are features and columns are examples)

scaling

if TRUE (default) scaling is performed

Author

Giorgio Valentini valentini@di.unimi.it

Details

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\).

References

T.Ho, The random subspace method for constructing decision forests, IEEE Transactions on Pattern Analysis and Machine Intelligence 20 (8) (1998) 832-844.

See Also

Plus.Minus.One.random.projection, norm.random.projection,

Achlioptas.random.projection

Examples

Run this code
# 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)

Run the code above in your browser using DataLab