Class WekaClusterer

  • All Implemented Interfaces:
    adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.SizeOfHandler, adams.ml.capabilities.CapabilitiesHandler, adams.ml.model.Algorithm<adams.ml.model.clustering.ClusteringModel>, adams.ml.model.clustering.Clusterer, Serializable

    public class WekaClusterer
    extends adams.ml.model.clustering.AbstractClusterer
    Wraps around a Weka clusterer.

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -strict-capabilities <boolean> (property: strictCapabilities)
        If enabled, a strict capabilities test is performed; otherwise, it is attempted 
        to adjust the data to fit the algorithm's capabilities.
        default: false
     
    -clusterer <weka.clusterers.Clusterer> (property: clusterer)
        The clusterer to use.
        default: weka.clusterers.SimpleKMeans -init 0 -max-candidates 100 -periodic-pruning 10000 -min-density 2.0 -t1 -1.25 -t2 -1.0 -N 2 -A \"weka.core.EuclideanDistance -R first-last\" -I 500 -num-slots 1 -S 10
     
    Version:
    $Revision$
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected weka.clusterers.Clusterer m_Clusterer
      the weka classifier to use.
      • Fields inherited from class adams.ml.model.clustering.AbstractClusterer

        m_StrictCapabilities
      • Fields inherited from class adams.core.option.AbstractOptionHandler

        m_OptionManager
      • Fields inherited from class adams.core.logging.LoggingObject

        m_Logger, m_LoggingIsEnabled, m_LoggingLevel
    • Constructor Summary

      Constructors 
      Constructor Description
      WekaClusterer()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String clustererTipText()
      Returns the tip text for this property.
      void defineOptions()
      Adds options to the internal list of options.
      protected adams.ml.model.clustering.ClusteringModel doBuildModel​(adams.ml.data.Dataset data)
      Builds a model from the data.
      adams.ml.capabilities.Capabilities getCapabilities()
      Returns the algorithm's capabilities in terms of data.
      weka.clusterers.Clusterer getClusterer()
      Returns the clusterer to use.
      String globalInfo()
      Returns a string describing the object.
      void setClusterer​(weka.clusterers.Clusterer value)
      Sets the clusterer to use.
      • Methods inherited from class adams.ml.model.clustering.AbstractClusterer

        buildModel, check, getStrictCapabilities, handles, setStrictCapabilities, strictCapabilitiesTipText
      • Methods inherited from class adams.core.option.AbstractOptionHandler

        cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
      • Methods inherited from class adams.core.logging.LoggingObject

        configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
      • Methods inherited from interface adams.core.Destroyable

        destroy
      • Methods inherited from interface adams.core.logging.LoggingLevelHandler

        getLoggingLevel
      • Methods inherited from interface adams.core.option.OptionHandler

        cleanUpOptions, getOptionManager, toCommandLine
    • Field Detail

      • m_Clusterer

        protected weka.clusterers.Clusterer m_Clusterer
        the weka classifier to use.
    • Constructor Detail

      • WekaClusterer

        public WekaClusterer()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Specified by:
        globalInfo in class adams.core.option.AbstractOptionHandler
        Returns:
        a description suitable for displaying in the gui
      • defineOptions

        public void defineOptions()
        Adds options to the internal list of options.
        Specified by:
        defineOptions in interface adams.core.option.OptionHandler
        Overrides:
        defineOptions in class adams.ml.model.clustering.AbstractClusterer
      • setClusterer

        public void setClusterer​(weka.clusterers.Clusterer value)
        Sets the clusterer to use.
        Parameters:
        value - the clusterer
      • getClusterer

        public weka.clusterers.Clusterer getClusterer()
        Returns the clusterer to use.
        Returns:
        the clusterer
      • clustererTipText

        public String clustererTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • getCapabilities

        public adams.ml.capabilities.Capabilities getCapabilities()
        Returns the algorithm's capabilities in terms of data.
        Specified by:
        getCapabilities in interface adams.ml.model.Algorithm<adams.ml.model.clustering.ClusteringModel>
        Specified by:
        getCapabilities in interface adams.ml.capabilities.CapabilitiesHandler
        Overrides:
        getCapabilities in class adams.ml.model.clustering.AbstractClusterer
        Returns:
        the algorithm's capabilities
      • doBuildModel

        protected adams.ml.model.clustering.ClusteringModel doBuildModel​(adams.ml.data.Dataset data)
                                                                  throws Exception
        Builds a model from the data.
        Specified by:
        doBuildModel in class adams.ml.model.clustering.AbstractClusterer
        Parameters:
        data - the data to use for building the model
        Returns:
        the generated model
        Throws:
        Exception - if the build fails