Class MakeDensityBasedClusterer

    • Constructor Detail

      • MakeDensityBasedClusterer

        public MakeDensityBasedClusterer()
        Default constructor.
      • MakeDensityBasedClusterer

        public MakeDensityBasedClusterer​(Clusterer toWrap)
        Contructs a MakeDensityBasedClusterer wrapping a given Clusterer.
        Parameters:
        toWrap - the clusterer to wrap around
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing classifier
        Returns:
        a description suitable for displaying in the explorer/experimenter gui
      • setNumClusters

        public void setNumClusters​(int n)
                            throws Exception
        Set the number of clusters to generate.
        Specified by:
        setNumClusters in interface NumberOfClustersRequestable
        Parameters:
        n - the number of clusters to generate
        Throws:
        Exception - if the wrapped clusterer has not been set, or if the wrapped clusterer does not implement this facility.
      • toString

        public String toString()
        Returns a description of the clusterer.
        Overrides:
        toString in class Object
        Returns:
        a string containing a description of the clusterer
      • clustererTipText

        public String clustererTipText()
        Returns the tip text for this property
        Returns:
        tip text for this property suitable for displaying in the explorer/experimenter gui
      • setClusterer

        public void setClusterer​(Clusterer toWrap)
        Sets the clusterer to wrap.
        Parameters:
        toWrap - the clusterer
      • getClusterer

        public Clusterer getClusterer()
        Gets the clusterer being wrapped.
        Returns:
        the clusterer
      • minStdDevTipText

        public String minStdDevTipText()
        Returns the tip text for this property
        Returns:
        tip text for this property suitable for displaying in the explorer/experimenter gui
      • setMinStdDev

        public void setMinStdDev​(double m)
        Set the minimum value for standard deviation when calculating normal density. Reducing this value can help prevent arithmetic overflow resulting from multiplying large densities (arising from small standard deviations) when there are many singleton or near singleton values.
        Parameters:
        m - minimum value for standard deviation
      • getMinStdDev

        public double getMinStdDev()
        Get the minimum allowable standard deviation.
        Returns:
        the minumum allowable standard deviation
      • setOptions

        public void setOptions​(String[] options)
                        throws Exception
        Parses a given list of options.

        Valid options are:

         -M <num>
          minimum allowable standard deviation for normal density computation 
          (default 1e-6)
         
         -W <clusterer name>
          Clusterer to wrap.
          (default weka.clusterers.SimpleKMeans)
         
         Options specific to clusterer weka.clusterers.SimpleKMeans:
         
         -N <num>
          number of clusters.
          (default 2).
         
         -V
          Display std. deviations for centroids.
         
         -M
          Replace missing values with mean/mode.
         
         -S <num>
          Random number seed.
          (default 10)
         
        Specified by:
        setOptions in interface OptionHandler
        Overrides:
        setOptions in class AbstractClusterer
        Parameters:
        options - the list of options as an array of strings
        Throws:
        Exception - if an option is not supported
      • main

        public static void main​(String[] argv)
        Main method for testing this class.
        Parameters:
        argv - the options