All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home

Class weka.classifiers.adtree.PredictionNode

java.lang.Object
    |
    +----weka.classifiers.adtree.PredictionNode

public final class PredictionNode
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Class representing a prediction node in an alternating tree.

Version:
$Revision: 1.1.2.1 $
Author:
Richard Kirkby (rkirkby@cs.waikato.ac.nz)

Constructor Index

 o PredictionNode(double)
Creates a new prediction node.

Method Index

 o addChild(Splitter, ADTree)
Adds a child to this node.
 o children()
Enumerates the children of this node.
 o clone()
Clones this node.
 o getChildren()
Gets the children of this node.
 o getValue()
Gets the prediction value of the node.
 o merge(PredictionNode, ADTree)
Merges this node with another.
 o setValue(double)
Sets the prediction value of the node.

Constructor Detail

 o PredictionNode
public PredictionNode(double newValue)
          Creates a new prediction node.
Parameters:
newValue - the value that the node should store

Method Detail

 o setValue
public final void setValue(double newValue)
          Sets the prediction value of the node.
Parameters:
newValue - the value that the node should store
 o getValue
public final double getValue()
          Gets the prediction value of the node.
Returns:
the value stored in the node
 o getChildren
public final FastVector getChildren()
          Gets the children of this node.
Returns:
a FastVector containing child Splitter object references
 o children
public final java.util.Enumeration children()
          Enumerates the children of this node.
Returns:
an enumeration of child Splitter object references
 o addChild
public final void addChild(Splitter newChild,
                           ADTree addingTo)
          Adds a child to this node. If possible will merge, and will perform a deep copy of the child tree.
Parameters:
newChild - the new child to add (will be cloned)
addingTo - the tree that this node belongs to
 o clone
public final java.lang.Object clone()
          Clones this node. Performs a deep copy, recursing through the tree.
Returns:
a clone
 o merge
public final void merge(PredictionNode merger,
                        ADTree mergingTo)
          Merges this node with another.
Parameters:
merger - the node that is merging with this node - will not be affected, will instead be cloned
mergingTo - the tree that this node belongs to

All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home