Class OUTRES.KernelDensityEstimator

  • Enclosing class:
    OUTRES

    protected static class OUTRES.KernelDensityEstimator
    extends java.lang.Object
    Kernel density estimation and utility class.
    Author:
    Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) int dim
      Dimensionality of data set
      (package private) double[] epsilons
      Epsilon values for different subspace dimensionalities
      (package private) double hopttwo
      Optimal bandwidth for a dimensionality of 2
      (package private) KernelDensityFunction kernel
      Actual kernel in use
      (package private) Relation<? extends NumberVector> relation
      Relation to retrieve data from
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected double adjustedEps​(int dim)
      Rescale the query radius based on the given dimensionality.
      protected double optimalBandwidth​(int dim)
      Compute optimal kernel bandwidth
      protected double subspaceDensity​(long[] subspace, DoubleDBIDList neighbors)
      Compute density in the given subspace.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • epsilons

        final double[] epsilons
        Epsilon values for different subspace dimensionalities
      • hopttwo

        final double hopttwo
        Optimal bandwidth for a dimensionality of 2
      • dim

        final int dim
        Dimensionality of data set
    • Constructor Detail

      • KernelDensityEstimator

        public KernelDensityEstimator​(Relation<? extends NumberVector> relation,
                                      double eps)
        Constructor.
        Parameters:
        relation - Relation to apply to
    • Method Detail

      • subspaceDensity

        protected double subspaceDensity​(long[] subspace,
                                         DoubleDBIDList neighbors)
        Compute density in the given subspace.
        Parameters:
        subspace - Subspace
        neighbors - Neighbor distance list
        Returns:
        Density
      • optimalBandwidth

        protected double optimalBandwidth​(int dim)
        Compute optimal kernel bandwidth
        Parameters:
        dim - Dimensionality of subspace
        Returns:
        optimal bandwidth
      • adjustedEps

        protected double adjustedEps​(int dim)
        Rescale the query radius based on the given dimensionality.
        Parameters:
        dim - Dimensionality
        Returns:
        Query radius