Class HighLowSplitSingleClassifier

  • All Implemented Interfaces:
    Serializable, Cloneable, weka.classifiers.Classifier, weka.core.BatchPredictor, weka.core.CapabilitiesHandler, weka.core.CapabilitiesIgnorer, weka.core.CommandlineRunnable, weka.core.OptionHandler, weka.core.RevisionHandler, weka.core.WeightedInstancesHandler

    public class HighLowSplitSingleClassifier
    extends weka.classifiers.SingleClassifierEnhancer
    implements weka.core.WeightedInstancesHandler
    Uses base classifier to get guess, then get prediction from either lo/hi classifier

    Valid options are:

     -W
      Full name of base classifier.
      (default: weka.classifiers.rules.ZeroR)
     -output-debug-info
      If set, classifier is run in debug mode and
      may output additional info to the console
     -do-not-check-capabilities
      If set, classifier capabilities are not checked before classifier is built
      (use with caution).
     
     Options specific to classifier weka.classifiers.rules.ZeroR:
     
     -output-debug-info
      If set, classifier is run in debug mode and
      may output additional info to the console
     -do-not-check-capabilities
      If set, classifier capabilities are not checked before classifier is built
      (use with caution).
     -S <dbl>
      Lowest value for hi classifier
      (default: 10)
     
     -P <dbl>
      Highest value for lo classifier
      (default: 15)
     
     -E <dbl>
      Decision boundary for hi/lo classifier
      (default: 12.5)
     
     -F
      Full name of hi classifier.
      (default: weka.classifiers.rules.ZeroR)
     -W
      Full name of base classifier.
      (default: weka.classifiers.rules.ZeroR)
     -output-debug-info
      If set, classifier is run in debug mode and
      may output additional info to the console
     -do-not-check-capabilities
      If set, classifier capabilities are not checked before classifier is built
      (use with caution).
     
     Options specific to classifier weka.classifiers.rules.ZeroR:
     
     -output-debug-info
      If set, classifier is run in debug mode and
      may output additional info to the console
     -do-not-check-capabilities
      If set, classifier capabilities are not checked before classifier is built
      (use with caution).
     
     Options specific to classifier weka.classifiers.rules.ZeroR:
     
     -output-debug-info
      If set, classifier is run in debug mode and
      may output additional info to the console
     -do-not-check-capabilities
      If set, classifier capabilities are not checked before classifier is built
      (use with caution).
     -G
      Full name of lo classifier.
      (default: weka.classifiers.rules.ZeroR)
     -W
      Full name of base classifier.
      (default: weka.classifiers.rules.ZeroR)
     -output-debug-info
      If set, classifier is run in debug mode and
      may output additional info to the console
     -do-not-check-capabilities
      If set, classifier capabilities are not checked before classifier is built
      (use with caution).
     
     Options specific to classifier weka.classifiers.rules.ZeroR:
     
     -output-debug-info
      If set, classifier is run in debug mode and
      may output additional info to the console
     -do-not-check-capabilities
      If set, classifier capabilities are not checked before classifier is built
      (use with caution).
     
     Options specific to classifier weka.classifiers.rules.ZeroR:
     
     -output-debug-info
      If set, classifier is run in debug mode and
      may output additional info to the console
     -do-not-check-capabilities
      If set, classifier capabilities are not checked before classifier is built
      (use with caution).
    Version:
    $Revision: 6936 $
    Author:
    Dale?
    See Also:
    Serialized Form
    • Field Detail

      • m_loClassifier

        protected weka.classifiers.Classifier m_loClassifier
      • m_loHipoint

        protected double m_loHipoint
      • m_splitpoint

        protected double m_splitpoint
    • Constructor Detail

      • HighLowSplitSingleClassifier

        public HighLowSplitSingleClassifier()
    • Method Detail

      • globalInfo

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

        protected String defaultClassifierString()
        String describing default classifier.
        Overrides:
        defaultClassifierString in class weka.classifiers.SingleClassifierEnhancer
      • defaultClassifierOptions

        protected String[] defaultClassifierOptions()
        String describing options for default classifier.
        Overrides:
        defaultClassifierOptions in class weka.classifiers.SingleClassifierEnhancer
      • listOptions

        public Enumeration listOptions()
        Returns an enumeration describing the available options.
        Specified by:
        listOptions in interface weka.core.OptionHandler
        Overrides:
        listOptions in class weka.classifiers.SingleClassifierEnhancer
        Returns:
        an enumeration of all the available options.
      • setOptions

        public void setOptions​(String[] options)
                        throws Exception
        Sets the OptionHandler's options using the given list. All options will be set (or reset) during this call (i.e. incremental setting of options is not possible). Valid options are:

         -W
          Full name of base classifier.
          (default: weka.classifiers.rules.ZeroR)
         -output-debug-info
          If set, classifier is run in debug mode and
          may output additional info to the console
         -do-not-check-capabilities
          If set, classifier capabilities are not checked before classifier is built
          (use with caution).
         
         Options specific to classifier weka.classifiers.rules.ZeroR:
         
         -output-debug-info
          If set, classifier is run in debug mode and
          may output additional info to the console
         -do-not-check-capabilities
          If set, classifier capabilities are not checked before classifier is built
          (use with caution).
         -S <dbl>
          Lowest value for hi classifier
          (default: 10)
         
         -P <dbl>
          Highest value for lo classifier
          (default: 15)
         
         -E <dbl>
          Decision boundary for hi/lo classifier
          (default: 12.5)
         
         -F
          Full name of hi classifier.
          (default: weka.classifiers.rules.ZeroR)
         -W
          Full name of base classifier.
          (default: weka.classifiers.rules.ZeroR)
         -output-debug-info
          If set, classifier is run in debug mode and
          may output additional info to the console
         -do-not-check-capabilities
          If set, classifier capabilities are not checked before classifier is built
          (use with caution).
         
         Options specific to classifier weka.classifiers.rules.ZeroR:
         
         -output-debug-info
          If set, classifier is run in debug mode and
          may output additional info to the console
         -do-not-check-capabilities
          If set, classifier capabilities are not checked before classifier is built
          (use with caution).
         
         Options specific to classifier weka.classifiers.rules.ZeroR:
         
         -output-debug-info
          If set, classifier is run in debug mode and
          may output additional info to the console
         -do-not-check-capabilities
          If set, classifier capabilities are not checked before classifier is built
          (use with caution).
         -G
          Full name of lo classifier.
          (default: weka.classifiers.rules.ZeroR)
         -W
          Full name of base classifier.
          (default: weka.classifiers.rules.ZeroR)
         -output-debug-info
          If set, classifier is run in debug mode and
          may output additional info to the console
         -do-not-check-capabilities
          If set, classifier capabilities are not checked before classifier is built
          (use with caution).
         
         Options specific to classifier weka.classifiers.rules.ZeroR:
         
         -output-debug-info
          If set, classifier is run in debug mode and
          may output additional info to the console
         -do-not-check-capabilities
          If set, classifier capabilities are not checked before classifier is built
          (use with caution).
         
         Options specific to classifier weka.classifiers.rules.ZeroR:
         
         -output-debug-info
          If set, classifier is run in debug mode and
          may output additional info to the console
         -do-not-check-capabilities
          If set, classifier capabilities are not checked before classifier is built
          (use with caution).
        Specified by:
        setOptions in interface weka.core.OptionHandler
        Overrides:
        setOptions in class weka.classifiers.SingleClassifierEnhancer
        Parameters:
        options - the list of options as an array of strings
        Throws:
        Exception - if an option is not supported
      • getOptions

        public String[] getOptions()
        Gets the current option settings for the OptionHandler.
        Specified by:
        getOptions in interface weka.core.OptionHandler
        Overrides:
        getOptions in class weka.classifiers.SingleClassifierEnhancer
        Returns:
        the list of current option settings as an array of strings
      • getLoHipoint

        public double getLoHipoint()
      • setLoHipoint

        public void setLoHipoint​(double l)
      • loHipointTipText

        public String loHipointTipText()
      • getSplitpoint

        public double getSplitpoint()
      • setSplitpoint

        public void setSplitpoint​(double s)
      • splitpointTipText

        public String splitpointTipText()
      • getCapabilities

        public weka.core.Capabilities getCapabilities()
        Returns default capabilities of the base classifier.
        Specified by:
        getCapabilities in interface weka.core.CapabilitiesHandler
        Specified by:
        getCapabilities in interface weka.classifiers.Classifier
        Overrides:
        getCapabilities in class weka.classifiers.SingleClassifierEnhancer
        Returns:
        the capabilities of the base classifier
      • buildClassifier

        public void buildClassifier​(weka.core.Instances data)
                             throws Exception
        Builds the classifier.
        Specified by:
        buildClassifier in interface weka.classifiers.Classifier
        Parameters:
        data - the training data
        Throws:
        Exception - if something goes wrong
      • classifyInstance

        public double classifyInstance​(weka.core.Instance inst)
                                throws Exception
        Returns the prediction.
        Specified by:
        classifyInstance in interface weka.classifiers.Classifier
        Overrides:
        classifyInstance in class weka.classifiers.AbstractClassifier
        Throws:
        Exception
      • toString

        public String toString()
        Returns description of classifier.
        Overrides:
        toString in class Object
      • getRevision

        public String getRevision()
        Specified by:
        getRevision in interface weka.core.RevisionHandler
        Overrides:
        getRevision in class weka.classifiers.AbstractClassifier
      • main

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