Class DecisionStump

    • Constructor Detail

      • DecisionStump

        public DecisionStump()
    • Method Detail

      • globalInfo

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

        public void buildClassifier​(Instances instances)
                             throws Exception
        Generates the classifier.
        Specified by:
        buildClassifier in interface Classifier
        Parameters:
        instances - set of instances serving as training data
        Throws:
        Exception - if the classifier has not been generated successfully
      • toSource

        public String toSource​(String className)
                        throws Exception
        Returns the decision tree as Java source code.
        Specified by:
        toSource in interface Sourcable
        Parameters:
        className - the classname of the generated code
        Returns:
        the tree as Java source code
        Throws:
        Exception - if something goes wrong
      • toString

        public String toString()
        Returns a description of the classifier.
        Overrides:
        toString in class Object
        Returns:
        a description of the classifier as a string.
      • main

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