Class M5Base

    • Constructor Detail

      • M5Base

        public M5Base()
        Constructor
    • Method Detail

      • getTechnicalInformation

        public TechnicalInformation getTechnicalInformation()
        Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on.
        Specified by:
        getTechnicalInformation in interface TechnicalInformationHandler
        Returns:
        the technical information about this class
      • setOptions

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

        Valid options are:

        -U
        Use unsmoothed predictions.

        -R
        Build a regression tree rather than a model tree.

        Specified by:
        setOptions in interface OptionHandler
        Overrides:
        setOptions in class AbstractClassifier
        Parameters:
        options - the list of options as an array of strings
        Throws:
        Exception - if an option is not supported
      • kuenzelEtAlSplitSelectionTipText

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

        public void setKuenzelEtAlSplitSelection​(boolean unpruned)
        Use Kuenzel et al.'s split selection
        Parameters:
        unpruned - true if Kuenzel et al.'s split selection is used
      • getKuenzelEtAlSplitSelection

        public boolean getKuenzelEtAlSplitSelection()
        Get whether Kuenzel et al.'s split selection is used
        Returns:
        true if Kuenzel et al.'s split selection is used
      • unprunedTipText

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

        public void setUnpruned​(boolean unpruned)
        Use unpruned tree/rules
        Parameters:
        unpruned - true if unpruned tree/rules are to be generated
      • getUnpruned

        public boolean getUnpruned()
        Get whether unpruned tree/rules are being generated
        Returns:
        true if unpruned tree/rules are to be generated
      • generateRulesTipText

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

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

        public void setUseUnsmoothed​(boolean s)
        Use unsmoothed predictions
        Parameters:
        s - true if unsmoothed predictions are to be used
      • getUseUnsmoothed

        public boolean getUseUnsmoothed()
        Get whether or not smoothing is being used
        Returns:
        true if unsmoothed predictions are to be used
      • buildRegressionTreeTipText

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

        public boolean getBuildRegressionTree()
        Get the value of regressionTree.
        Returns:
        Value of regressionTree.
      • setBuildRegressionTree

        public void setBuildRegressionTree​(boolean newregressionTree)
        Set the value of regressionTree.
        Parameters:
        newregressionTree - Value to assign to regressionTree.
      • minNumInstancesTipText

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

        public void setMinNumInstances​(double minNum)
        Set the minimum number of instances to allow at a leaf node
        Parameters:
        minNum - the minimum number of instances
      • getMinNumInstances

        public double getMinNumInstances()
        Get the minimum number of instances to allow at a leaf node
        Returns:
        a double value
      • buildClassifier

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

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

        public double getMeasure​(String additionalMeasureName)
        Returns the value of the named measure
        Specified by:
        getMeasure in interface AdditionalMeasureProducer
        Parameters:
        additionalMeasureName - the name of the measure to query for its value
        Returns:
        the value of the named measure
        Throws:
        Exception - if the named measure is not supported
      • measureNumRules

        public double measureNumRules()
        return the number of rules
        Returns:
        the number of rules (same as # linear models & # leaves in the tree)
      • getM5RootNode

        public RuleNode getM5RootNode()