Learn R Programming

clusterv (version 1.1.1)

random.component.selection: Function to randomly select the indices of the variables selected by the random subspace projection

Description

It is used by the function random.subspace to randomly select the indices of the variables used for the random subspace projections. It randomly select a subset of the indices, that is a set of positive integers that correspond to the selected variables

Usage

random.component.selection(d = 2, d.original = 10)

Value

vector of the selected features: it contain the indices of the components randomly selected

Arguments

d

subspace dimension

d.original

dimension of the space from which components are randomly selected

Author

Giorgio Valentini valentini@di.unimi.it

See Also

random.subspace

Examples

Run this code
# it generates a vector of 2 elements whose components are randomly 
# chosen from 1..10
random.component.selection(d = 2, d.original = 10)
# it generates a vector of 10 elements whose components are randomly 
# chosen from 1..1000
random.component.selection(d = 10, d.original = 1000)

Run the code above in your browser using DataLab