Class HistogramJitterFilter<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

    @Description("Add uniform Jitter to a dataset, while preserving the total vector sum.")
    public class HistogramJitterFilter<V extends elki.data.NumberVector>
    extends AbstractVectorStreamConversionFilter<V,​V>
    Add jitter, preserving the histogram properties (same sum, nonnegative).

    For each vector, the total sum of all dimensions is computed.
    Then a random vector of the average length jitter * scale is added and the result normalized to the original vectors sum. The individual dimensions are drawn from an exponential distribution with scale jitter / dimensionality, so it is expected that the error in most dimensions will be low, and higher in few.

    This is designed to degrade the quality of a histogram, while preserving the total sum (e.g., to keep the normalization). The factor "jitter" can be used to control the degradation amount.

    Since:
    0.5.5
    Author:
    Erich Schubert
    • Field Detail

      • jitter

        double jitter
        Jitter amount.
      • dist

        elki.math.statistics.distribution.Distribution dist
        Random generator.
      • rnd

        java.util.Random rnd
        Random generator.
    • Constructor Detail

      • HistogramJitterFilter

        public HistogramJitterFilter​(double jitter,
                                     elki.utilities.random.RandomFactory rnd)
        Constructor.
        Parameters:
        jitter - Relative amount of jitter to add
        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<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