V
- the type of FeatureVector contained in both the original data of
the base parser and the projected data of this ProjectionParserpublic abstract class AbstractRandomFeatureSelectionFilter<V extends FeatureVector<?,?>> extends AbstractStreamConversionFilter<V,V>
A RandomProjectionParser selects a subset of attributes randomly for projection of a ParsingResult.
The cardinality of the subset of attributes is specified as a parameter.Modifier and Type | Class and Description |
---|---|
static class |
AbstractRandomFeatureSelectionFilter.Parameterizer<V extends NumberVector<V,?>>
Parameterization class.
|
BundleStreamSource.Event
Modifier and Type | Field and Description |
---|---|
protected int |
k
Holds the desired cardinality of the subset of attributes selected for
projection.
|
static OptionID |
NUMBER_SELECTED_ATTRIBUTES_ID
Parameter for the desired cardinality of the subset of attributes selected
for projection.
|
protected Random |
random
Holds a random object.
|
static OptionID |
SEED_ID
Optional parameter to specify a seed for random projection.
|
protected BitSet |
selectedAttributes
The selected attributes
|
column, meta
source
Constructor and Description |
---|
AbstractRandomFeatureSelectionFilter(int dim)
Constructor.
|
AbstractRandomFeatureSelectionFilter(int dim,
long seed)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
initializeRandomAttributes(SimpleTypeInformation<V> in)
Initialize random attributes.
|
convertedType, data, filterSingleObject, getInputTypeRestriction, getMeta, nextEvent
filter, init
protected BitSet selectedAttributes
public static final OptionID NUMBER_SELECTED_ATTRIBUTES_ID
Key: -randomprojection.numberselected
Default: 1
Constraint: ≥1
public static final OptionID SEED_ID
Key: -randomprojection.seed
protected int k
protected final Random random
public AbstractRandomFeatureSelectionFilter(int dim)
dim
- dimensionalitypublic AbstractRandomFeatureSelectionFilter(int dim, long seed)
dim
- dimensionalityseed
- seed for randomvoid initializeRandomAttributes(SimpleTypeInformation<V> in)
AbstractStreamConversionFilter.convertedType(de.lmu.ifi.dbs.elki.data.type.SimpleTypeInformation<I>)
!in
- Type information.