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

Class weka.classifiers.bayes.ADNode

java.lang.Object
    |
    +----weka.classifiers.bayes.ADNode

public class ADNode
extends java.lang.Object
The ADNode class implements the ADTree datastructure which increases the speed with which sub-contingency tables can be constructed from a data set in an Instances object. For details, see Cached Sufficient Statistics for Efficient Machine Learning with Large Datasets Andrew Moore, and Mary Soon Lee Journal of Artificial Intelligence Research 8 (1998) 67-91 *

Version:
$Revision: 1.2 $
Author:
Remco Bouckaert (rrb@xm.co.nz)

Variable Index

 o m_Instances
list of Instance children (either m_Instances or m_VaryNodes is instantiated)
 o m_nCount
count
 o m_nStartNode
first node in VaryNode array
 o m_VaryNodes
list of VaryNode children

Constructor Index

 o ADNode()
Creates new ADNode

Method Index

 o getCounts(int[], int[], int[], int, int, boolean)
get counts for specific instantiation of a set of nodes
 o MakeADTree(Instances)
create AD tree from set of instances
 o MakeADTree(int, FastVector, Instances)
create sub tree
 o MakeVaryNode(int, FastVector, Instances)
create sub tree
 o print()
 

Field Detail

 o m_VaryNodes
public VaryNode[] m_VaryNodes
          list of VaryNode children
 o m_Instances
public Instance[] m_Instances
          list of Instance children (either m_Instances or m_VaryNodes is instantiated)
 o m_nCount
public int m_nCount
          count
 o m_nStartNode
public int m_nStartNode
          first node in VaryNode array

Constructor Detail

 o ADNode
public ADNode()
          Creates new ADNode

Method Detail

 o MakeVaryNode
public static VaryNode MakeVaryNode(int iNode,
                                    FastVector nRecords,
                                    Instances instances)
          create sub tree
Parameters:
iNode: - index of the lowest node in the tree
nRecords: - set of records in instances to be considered
instances: - data set
Returns:
VaryNode representing part of an ADTree
 o MakeADTree
public static ADNode MakeADTree(int iNode,
                                FastVector nRecords,
                                Instances instances)
          create sub tree
Parameters:
iNode: - index of the lowest node in the tree
nRecords: - set of records in instances to be considered
instances: - data set
Returns:
ADNode representing an ADTree
 o MakeADTree
public static ADNode MakeADTree(Instances instances)
          create AD tree from set of instances
Parameters:
instances: - data set
Returns:
ADNode representing an ADTree
 o getCounts
public void getCounts(int nCounts[],
                      int nNodes[],
                      int nOffsets[],
                      int iNode,
                      int iOffset,
                      boolean bSubstract)
          get counts for specific instantiation of a set of nodes
Parameters:
nCounts - - array for storing counts
nNodes - - array of node indexes
nOffsets - - offset for nodes in nNodes in nCounts
iNode - - index into nNode indicating current node
iOffset - - Offset into nCounts due to nodes below iNode
bSubstract - - indicate whether counts should be added or substracted
 o print
public void print()

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