Package weka.classifiers.trees.j48

# Class NoSplit

java.lang.Object
weka.classifiers.trees.j48.ClassifierSplitModel
weka.classifiers.trees.j48.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:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `NoSplit(Distribution distribution)`
  Creates "no-split"-split for given distribution.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final void`
  `buildClassifier(Instances instances)`
  Creates a "no-split"-split for a given set of instances.
  `String`
  `getRevision()`
  Returns the revision string.
  `final String`
  `leftSide(Instances instances)`
  Does nothing because no condition has to be satisfied.
  `final String`
  `rightSide(int index, Instances instances)`
  Does nothing because no condition has to be satisfied.
  `final String`
  `sourceExpression(int index, Instances data)`
  Returns a string containing java source code equivalent to the test made at this node.
  `final double[]`
  `weights(Instance instance)`
  Always returns null because there is only one subset.
  `final int`
  `whichSubset(Instance instance)`
  Always returns 0 because only there is only one subset.

  ### Methods inherited from class weka.classifiers.trees.j48.ClassifierSplitModel

  `checkModel, classifyInstance, classProb, classProbLaplace, clone, codingCost, distribution, dumpLabel, dumpModel, numSubsets, resetDistribution, setDistribution, sourceClass, split`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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