de.lmu.ifi.dbs.elki.datasource.filter
Class AbstractRandomFeatureSelectionFilter<V extends FeatureVector<?,?>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.datasource.filter.AbstractConversionFilter<V,V>
      extended by de.lmu.ifi.dbs.elki.datasource.filter.AbstractRandomFeatureSelectionFilter<V>
Type Parameters:
V - the type of FeatureVector contained in both the original data of the base parser and the projected data of this ProjectionParser
All Implemented Interfaces:
ObjectFilter
Direct Known Subclasses:
DoubleVectorRandomProjectionFilter, SparseFloatVectorRandomProjectionFilter

public abstract class AbstractRandomFeatureSelectionFilter<V extends FeatureVector<?,?>>
extends AbstractConversionFilter<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.


Nested Class Summary
static class AbstractRandomFeatureSelectionFilter.Parameterizer<V extends NumberVector<V,?>>
          Parameterization class.
 
Field Summary
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.
protected  BitSet selectedAttributes
          The selected attributes
 
Constructor Summary
AbstractRandomFeatureSelectionFilter(int dim)
          Constructor.
 
Method Summary
protected  boolean prepareStart(SimpleTypeInformation<V> in)
          Return "true" when the normalization needs initialization (two-pass filtering!)
 
Methods inherited from class de.lmu.ifi.dbs.elki.datasource.filter.AbstractConversionFilter
convertedType, filter, filterSingleObject, getInputTypeRestriction, prepareComplete, prepareProcessInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

selectedAttributes

protected BitSet selectedAttributes
The selected attributes


NUMBER_SELECTED_ATTRIBUTES_ID

public static final OptionID NUMBER_SELECTED_ATTRIBUTES_ID
Parameter for the desired cardinality of the subset of attributes selected for projection.

Key: -randomprojection.numberselected

Default: 1

Constraint: ≥1


k

protected int k
Holds the desired cardinality of the subset of attributes selected for projection.


random

protected final Random random
Holds a random object.

Constructor Detail

AbstractRandomFeatureSelectionFilter

public AbstractRandomFeatureSelectionFilter(int dim)
Constructor.

Parameters:
dim - dimensionality
Method Detail

prepareStart

protected boolean prepareStart(SimpleTypeInformation<V> in)
Description copied from class: AbstractConversionFilter
Return "true" when the normalization needs initialization (two-pass filtering!)

Overrides:
prepareStart in class AbstractConversionFilter<V extends FeatureVector<?,?>,V extends FeatureVector<?,?>>
Parameters:
in - Input type information
Returns:
true or false

Release 0.4.0 (2011-09-20_1324)