Class NoSplit

All Implemented Interfaces:
Serializable, Cloneable, RevisionHandler

public final class NoSplit extends ClassifierSplitModel
Class implementing a "no-split"-split.
Version:
$Revision: 8034 $
Author:
Eibe Frank (eibe@cs.waikato.ac.nz)
See Also:
  • Constructor Details

    • NoSplit

      public NoSplit(Distribution distribution)
      Creates "no-split"-split for given distribution.
  • Method Details

    • buildClassifier

      public final void buildClassifier(Instances instances) throws Exception
      Creates a "no-split"-split for a given set of instances.
      Specified by:
      buildClassifier in class ClassifierSplitModel
      Throws:
      Exception - if split can't be built successfully
    • whichSubset

      public final int whichSubset(Instance instance)
      Always returns 0 because only there is only one subset.
      Specified by:
      whichSubset in class ClassifierSplitModel
    • weights

      public final double[] weights(Instance instance)
      Always returns null because there is only one subset.
      Specified by:
      weights in class ClassifierSplitModel
    • leftSide

      public final String leftSide(Instances instances)
      Does nothing because no condition has to be satisfied.
      Specified by:
      leftSide in class ClassifierSplitModel
      Parameters:
      instances - the data.
    • rightSide

      public final String rightSide(int index, Instances instances)
      Does nothing because no condition has to be satisfied.
      Specified by:
      rightSide in class ClassifierSplitModel
    • sourceExpression

      public final String sourceExpression(int index, Instances data)
      Returns a string containing java source code equivalent to the test made at this node. The instance being tested is called "i".
      Specified by:
      sourceExpression in class ClassifierSplitModel
      Parameters:
      index - index of the nominal value tested
      data - the data containing instance structure info
      Returns:
      a value of type 'String'
    • getRevision

      public String getRevision()
      Returns the revision string.
      Returns:
      the revision