Package elki.datasource.filter.transform
Class NumberVectorFeatureSelectionFilter<V extends elki.data.NumberVector>
- java.lang.Object
-
- elki.datasource.filter.AbstractStreamFilter
-
- elki.datasource.filter.AbstractStreamConversionFilter<I,O>
-
- elki.datasource.filter.AbstractVectorStreamConversionFilter<V,V>
-
- elki.datasource.filter.transform.NumberVectorFeatureSelectionFilter<V>
-
- Type Parameters:
V- Vector type
- All Implemented Interfaces:
elki.datasource.bundle.BundleStreamSource,elki.datasource.filter.ObjectFilter,elki.datasource.filter.StreamFilter
public class NumberVectorFeatureSelectionFilter<V extends elki.data.NumberVector> extends AbstractVectorStreamConversionFilter<V,V>
Parser to project the ParsingResult obtained by a suitable base parser onto a selected subset of attributes.- Since:
- 0.5.5
- Author:
- Arthur Zimek
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNumberVectorFeatureSelectionFilter.ParParameterization class.
-
Field Summary
Fields Modifier and Type Field Description private long[]selectedAttributesKeeps the selection of the subspace to project onto.-
Fields inherited from class elki.datasource.filter.AbstractVectorStreamConversionFilter
factory
-
Fields inherited from class elki.datasource.filter.AbstractStreamFilter
source
-
-
Constructor Summary
Constructors Constructor Description NumberVectorFeatureSelectionFilter(long[] selectedAttributes)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected elki.data.type.SimpleTypeInformation<? super V>convertedType(elki.data.type.SimpleTypeInformation<V> in)Get the output type from the input type after conversion.protected VfilterSingleObject(V obj)Normalize a single instance.intgetDimensionality()Get the resulting dimensionality.protected elki.data.type.SimpleTypeInformation<? super V>getInputTypeRestriction()Get the input type restriction used for negotiating the data query.long[]getSelectedAttributes()Provides a BitSet with the bits set to true corresponding to the selected attributes inNumberVectorFeatureSelectionFilter.Par.SELECTED_ATTRIBUTES_ID.voidsetSelectedAttributes(long[] selectedAttributes)Sets the bits set to true in the given BitSet as selected attributes inNumberVectorFeatureSelectionFilter.Par.SELECTED_ATTRIBUTES_ID.-
Methods inherited from class elki.datasource.filter.AbstractVectorStreamConversionFilter
initializeOutputType
-
Methods inherited from class elki.datasource.filter.AbstractStreamConversionFilter
data, getMeta, nextEvent
-
Methods inherited from class elki.datasource.filter.AbstractStreamFilter
asMultipleObjectsBundle, assignDBID, filter, hasDBIDs, init, toString
-
-
-
-
Method Detail
-
filterSingleObject
protected V filterSingleObject(V obj)
Description copied from class:AbstractStreamConversionFilterNormalize a single instance. You can implement this as UnsupportedOperationException if you override both public "normalize" functions!- Specified by:
filterSingleObjectin classAbstractStreamConversionFilter<V extends elki.data.NumberVector,V extends elki.data.NumberVector>- Parameters:
obj- Database object to normalize- Returns:
- Normalized database object
-
getInputTypeRestriction
protected elki.data.type.SimpleTypeInformation<? super V> getInputTypeRestriction()
Description copied from class:AbstractStreamConversionFilterGet the input type restriction used for negotiating the data query.- Specified by:
getInputTypeRestrictionin classAbstractStreamConversionFilter<V extends elki.data.NumberVector,V extends elki.data.NumberVector>- Returns:
- Type restriction
-
convertedType
protected elki.data.type.SimpleTypeInformation<? super V> convertedType(elki.data.type.SimpleTypeInformation<V> in)
Description copied from class:AbstractStreamConversionFilterGet the output type from the input type after conversion.- Specified by:
convertedTypein classAbstractStreamConversionFilter<V extends elki.data.NumberVector,V extends elki.data.NumberVector>- Parameters:
in- input type restriction- Returns:
- output type restriction
-
setSelectedAttributes
public void setSelectedAttributes(long[] selectedAttributes)
Sets the bits set to true in the given BitSet as selected attributes inNumberVectorFeatureSelectionFilter.Par.SELECTED_ATTRIBUTES_ID.- Parameters:
selectedAttributes- the new selected attributes
-
getSelectedAttributes
public long[] getSelectedAttributes()
Provides a BitSet with the bits set to true corresponding to the selected attributes inNumberVectorFeatureSelectionFilter.Par.SELECTED_ATTRIBUTES_ID.- Returns:
- the selected attributes
-
getDimensionality
public int getDimensionality()
Get the resulting dimensionality.- Returns:
- dimensionality
-
-