Class NumberVectorRandomFeatureSelectionFilter<V extends elki.data.NumberVector>

  • Type Parameters:
    V - vector type
    All Implemented Interfaces:
    elki.datasource.bundle.BundleStreamSource, elki.datasource.filter.ObjectFilter, elki.datasource.filter.StreamFilter

    public class NumberVectorRandomFeatureSelectionFilter<V extends elki.data.NumberVector>
    extends AbstractVectorStreamConversionFilter<V,​V>
    Parser to project the ParsingResult obtained by a suitable base parser onto a randomly selected subset of attributes.
    Since:
    0.4.0
    Author:
    Arthur Zimek
    • Field Detail

      • selectedAttributes

        protected long[] selectedAttributes
        The selected attributes.
      • k

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

        protected elki.utilities.random.RandomFactory rnd
        Holds a random generator.
    • Constructor Detail

      • NumberVectorRandomFeatureSelectionFilter

        public NumberVectorRandomFeatureSelectionFilter​(int dim,
                                                        elki.utilities.random.RandomFactory rnd)
        Constructor.
        Parameters:
        dim - Dimensionality
        rnd - Random generator
    • Method Detail

      • filterSingleObject

        protected V filterSingleObject​(V obj)
        Description copied from class: AbstractStreamConversionFilter
        Normalize a single instance. You can implement this as UnsupportedOperationException if you override both public "normalize" functions!
        Specified by:
        filterSingleObject in class AbstractStreamConversionFilter<V extends elki.data.NumberVector,​V extends elki.data.NumberVector>
        Parameters:
        obj - Database object to normalize
        Returns:
        Normalized database object
      • convertedType

        protected elki.data.type.SimpleTypeInformation<? super V> convertedType​(elki.data.type.SimpleTypeInformation<V> in)
        Description copied from class: AbstractStreamConversionFilter
        Get the output type from the input type after conversion.
        Specified by:
        convertedType in class AbstractStreamConversionFilter<V extends elki.data.NumberVector,​V extends elki.data.NumberVector>
        Parameters:
        in - input type restriction
        Returns:
        output type restriction