weka.classifiers.trees.ht

## Class LeafNode

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

- All Implemented Interfaces:
    java.io.Serializable
  Direct Known Subclasses:
    ActiveHNode, InactiveHNode

      public class LeafNode
      extends HNode
      implements java.io.Serializable

  Leaf node in a HoeffdingTree
  Version:
    $Revision: 9705 $
  Author:
    Richard Kirkby (rkirkby@cs.waikato.ac.nz), Mark Hall (mhall{[at]}pentaho{[dot]}com)
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `java.lang.String` | `m_parentBranch` Parent branch leading to this node
    `SplitNode` | `m_parentNode` Parent split node
    `HNode` | `m_theNode` The actual node for this leaf

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

      `m_classDistribution`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LeafNode()` Construct an empty leaf node
    `LeafNode(HNode node, SplitNode parentNode, java.lang.String parentBranch)` Construct a leaf node with the given actual node, parent and parent branch

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `updateNode(Instance inst)` Update the node with the supplied instance

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

      `classDistributionIsPure, getDistribution, graphTree, installNodeNums, isLeaf, leafForInstance, numEntriesInClassDistribution, toString, totalWeight, updateDistribution`

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

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

- - ### Field Detail

    - #### m_theNode

          public HNode m_theNode

      The actual node for this leaf

    - #### m_parentNode

          public SplitNode m_parentNode

      Parent split node

    - #### m_parentBranch

          public java.lang.String m_parentBranch

      Parent branch leading to this node

  - ### Constructor Detail

    - #### LeafNode

          public LeafNode()

      Construct an empty leaf node

    - #### LeafNode

          public LeafNode(HNode node,
                  SplitNode parentNode,
                  java.lang.String parentBranch)

      Construct a leaf node with the given actual node, parent and parent branch
      Parameters:
        `node` - the actual node at this leaf
        `parentNode` - the parent split node
        `parentBranch` - the branch leading to this node

  - ### Method Detail

    - #### updateNode

          public void updateNode(Instance inst)
                          throws java.lang.Exception

      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
      Throws:
        `java.lang.Exception` - if a problem occurs