public abstract class KDTreeNodeSplitter extends Object implements Serializable
| Modifier and Type | Field and Description | 
|---|---|
| protected EuclideanDistance | m_EuclideanDistanceThe distance function used for building the tree. | 
| protected weka.core.Instances | m_InstancesThe instances that'll be used for tree construction. | 
| protected int[] | m_InstListThe master index array that'll be reshuffled as nodes
 are split and the tree is constructed. | 
| protected boolean | m_NormalizeNodeWidthStores whether if the width of a KDTree
 node is normalized or not. | 
| static int | MAXIndex of max value in an array of attributes' range. | 
| static int | MINIndex of min value in an array of attributes' range. | 
| static int | WIDTHIndex of width value (max-min) in an array of attributes' range. | 
| Constructor and Description | 
|---|
| KDTreeNodeSplitter()default constructor. | 
| KDTreeNodeSplitter(int[] instList,
                  weka.core.Instances insts,
                  EuclideanDistance e)Creates a new instance of KDTreeNodeSplitter. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | correctlyInitialized()Checks whether an object of this class has been correctly
 initialized. | 
| String[] | getOptions()Gets the current settings of the object. | 
| Enumeration | listOptions()Returns an enumeration describing the available options. | 
| void | setEuclideanDistanceFunction(EuclideanDistance func)Sets the EuclideanDistance object to use for 
 splitting nodes. | 
| void | setInstanceList(int[] instList)Sets the master index array containing indices of the
 training instances. | 
| void | setInstances(weka.core.Instances inst)Sets the training instances on which the tree is (or is 
 to be) built. | 
| void | setNodeWidthNormalization(boolean normalize)Sets whether if a nodes region is normalized 
 or not. | 
| void | setOptions(String[] options)Parses a given list of options. | 
| abstract void | splitNode(KDTreeNode node,
         int numNodesCreated,
         double[][] nodeRanges,
         double[][] universe)Splits a node into two. | 
| protected int | widestDim(double[][] nodeRanges,
         double[][] universe)Returns the widest dimension. | 
protected weka.core.Instances m_Instances
protected EuclideanDistance m_EuclideanDistance
protected int[] m_InstList
protected boolean m_NormalizeNodeWidth
public static final int MIN
public static final int MAX
public static final int WIDTH
public KDTreeNodeSplitter()
public KDTreeNodeSplitter(int[] instList,
                  weka.core.Instances insts,
                  EuclideanDistance e)
instList - Reference of the master index array.insts - The set of training instances on which 
 the tree is built.e - The EuclideanDistance object that is used
 in tree contruction.public Enumeration listOptions()
public void setOptions(String[] options) throws Exception
options - the list of options as an array of stringsException - if an option is not supportedpublic String[] getOptions()
protected void correctlyInitialized()
                             throws Exception
Exception - If the object has not been correctly 
 initialized.public abstract void splitNode(KDTreeNode node, int numNodesCreated, double[][] nodeRanges, double[][] universe) throws Exception
node - The node to split.numNodesCreated - The number of nodes that so far have been
 created for the tree, so that the newly created nodes are 
 assigned correct/meaningful node numbers/ids.nodeRanges - The attributes' range for the points inside
 the node that is to be split.universe - The attributes' range for the whole 
 point-space.Exception - If there is some problem in splitting the
 given node.public void setInstances(weka.core.Instances inst)
inst - The training instances.public void setInstanceList(int[] instList)
instList - The master index array.public void setEuclideanDistanceFunction(EuclideanDistance func)
func - The EuclideanDistance object.public void setNodeWidthNormalization(boolean normalize)
normalize - Should be true if 
 normalization is required.protected int widestDim(double[][] nodeRanges,
            double[][] universe)
nodeRanges - The attributes' range of the 
 points inside the node that is to be split.universe - The attributes' range for the
 whole point-space.Copyright © 2014 University of Waikato, Hamilton, NZ. All Rights Reserved.