de.lmu.ifi.dbs.elki.datasource.filter
Class AbstractFeatureSelectionFilter<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.AbstractFeatureSelectionFilter<V>
Type Parameters:
V - the type of FeatureVector contained in both the original and projected data.
All Implemented Interfaces:
ObjectFilter
Direct Known Subclasses:
DoubleVectorProjectionFilter, SparseFloatVectorProjectionFilter

public abstract class AbstractFeatureSelectionFilter<V extends FeatureVector<?,?>>
extends AbstractConversionFilter<V,V>

A ProjectionParser projects the objects of its base parser onto a subspace specified by a BitSet.


Nested Class Summary
static class AbstractFeatureSelectionFilter.Parameterizer<V extends NumberVector<V,?>>
          Parameterization class.
 
Field Summary
static OptionID SELECTED_ATTRIBUTES_ID
           Selected attributes parameter.
private  BitSet selectedAttributes
          Keeps the selection of the subspace to project onto.
 
Constructor Summary
AbstractFeatureSelectionFilter(BitSet selectedAttributes)
          Constructor.
 
Method Summary
 int getDimensionality()
          Get the resulting dimensionality.
 BitSet getSelectedAttributes()
           Provides a BitSet with the bits set to true corresponding to the selected attributes in SELECTED_ATTRIBUTES_ID.
 void setSelectedAttributes(BitSet selectedAttributes)
           Sets the bits set to true in the given BitSet as selected attributes in SELECTED_ATTRIBUTES_ID.
 
Methods inherited from class de.lmu.ifi.dbs.elki.datasource.filter.AbstractConversionFilter
convertedType, filter, filterSingleObject, getInputTypeRestriction, prepareComplete, prepareProcessInstance, prepareStart
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SELECTED_ATTRIBUTES_ID

public static final OptionID SELECTED_ATTRIBUTES_ID

Selected attributes parameter.

Key: -projectionfilter.selectedattributes


selectedAttributes

private BitSet selectedAttributes
Keeps the selection of the subspace to project onto.

Constructor Detail

AbstractFeatureSelectionFilter

public AbstractFeatureSelectionFilter(BitSet selectedAttributes)
Constructor.

Parameters:
selectedAttributes -
Method Detail

setSelectedAttributes

public void setSelectedAttributes(BitSet selectedAttributes)

Sets the bits set to true in the given BitSet as selected attributes in SELECTED_ATTRIBUTES_ID.

The index in the BitSet is expected to be shifted to the left by one, i.e., index 0 in the BitSet relates to the first attribute.

Parameters:
selectedAttributes - the new selected attributes

getSelectedAttributes

public BitSet getSelectedAttributes()

Provides a BitSet with the bits set to true corresponding to the selected attributes in SELECTED_ATTRIBUTES_ID.

The index in the BitSet is shifted to the left by one, i.e., index 0 in the BitSet relates to the first attribute.

Returns:
the selected attributes

getDimensionality

public int getDimensionality()
Get the resulting dimensionality.

Returns:
dimensionality

Release 0.4.0 (2011-09-20_1324)