weka.classifiers.trees.ht

## Class SplitNode

- java.lang.Object
- - weka.classifiers.trees.ht.HNode
  - - weka.classifiers.trees.ht.SplitNode

- All Implemented Interfaces:
    java.io.Serializable

      public class SplitNode
      extends HNode

  Class for a node that splits the data in a Hoeffding tree
  Version:
    $Revision: 10169 $
  Author:
    Richard Kirkby (rkirkby@cs.waikato.ac.nz), Mark Hall (mhall{[at]}pentaho{[dot]}com)
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class weka.classifiers.trees.ht.HNode

      `m_classDistribution`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SplitNode(java.util.Map<java.lang.String,WeightMass> classDistrib, Split split)` Construct a new SplitNode

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `branchForInstance(Instance inst)` Return the branch that the supplied instance goes down
    `void` | `graphTree(java.lang.StringBuffer buff)`
    `int` | `installNodeNums(int nodeNum)`
    `boolean` | `isLeaf()` Returns true if this is a leaf
    `LeafNode` | `leafForInstance(Instance inst, SplitNode parent, java.lang.String parentBranch)` Return the leaf that the supplied instance ends up at
    `int` | `numChildred()` Number of child nodes
    `void` | `setChild(java.lang.String branch, HNode child)` Add a child
    `void` | `updateNode(Instance inst)` Update the node with the supplied instance

    - ### Methods inherited from class weka.classifiers.trees.ht.HNode

      `classDistributionIsPure, getDistribution, numEntriesInClassDistribution, toString, totalWeight, updateDistribution`

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

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

- - ### Constructor Detail

    - #### SplitNode

          public SplitNode(java.util.Map<java.lang.String,WeightMass> classDistrib,
                   Split split)

      Construct a new SplitNode
      Parameters:
        `classDistrib` - the class distribution
        `split` - the split

  - ### Method Detail

    - #### branchForInstance

          public java.lang.String branchForInstance(Instance inst)

      Return the branch that the supplied instance goes down
      Parameters:
        `inst` - the instance to find the branch for
      Returns:
        the branch that the supplied instance goes down

    - #### isLeaf

          public boolean isLeaf()

      Description copied from class: `HNode`
      Returns true if this is a leaf
      Overrides:
        `isLeaf` in class `HNode`
      Returns:

    - #### numChildred

          public int numChildred()

      Number of child nodes
      Returns:
        the number of child nodes

    - #### setChild

          public void setChild(java.lang.String branch,
                      HNode child)

      Add a child
      Parameters:
        `branch` - the branch for the child
        `child` - the child itself

    - #### leafForInstance

          public LeafNode leafForInstance(Instance inst,
                                 SplitNode parent,
                                 java.lang.String parentBranch)

      Description copied from class: `HNode`
      Return the leaf that the supplied instance ends up at
      Overrides:
        `leafForInstance` in class `HNode`
      Parameters:
        `inst` - the instance to find the leaf for
        `parent` - the parent node
        `parentBranch` - the parent branch
      Returns:
        the leaf that the supplied instance ends up at

    - #### updateNode

          public void updateNode(Instance inst)

      Description copied from class: `HNode`
      Update the node with the supplied instance
      Specified by:
        `updateNode` in class `HNode`
      Parameters:
        `inst` - the instance to update with

    - #### installNodeNums

          public int installNodeNums(int nodeNum)

      Overrides:
        `installNodeNums` in class `HNode`

    - #### graphTree

          public void graphTree(java.lang.StringBuffer buff)

      Overrides:
        `graphTree` in class `HNode`