类 KDTreeNodeSplitter
java.lang.Object
weka.core.neighboursearch.kdtrees.KDTreeNodeSplitter
- 所有已实现的接口:
Serializable
,OptionHandler
,RevisionHandler
- 直接已知子类:
KMeansInpiredMethod
,MedianOfWidestDimension
,MidPointOfWidestDimension
,SlidingMidPointOfWidestSide
public abstract class KDTreeNodeSplitter
extends Object
implements Serializable, OptionHandler, RevisionHandler
Class that splits up a KDTreeNode.
- 版本:
- $Revision: 1.2 $
- 作者:
- Ashraf M. Kibriya (amk14[at-the-rate]cs[dot]waikato[dot]ac[dot]nz)
- 另请参阅:
-
字段概要
字段 -
构造器概要
构造器构造器说明default constructor.KDTreeNodeSplitter
(int[] instList, Instances insts, EuclideanDistance e) Creates a new instance of KDTreeNodeSplitter. -
方法概要
修饰符和类型方法说明String[]
Gets the current settings of the object.Returns the revision string.Returns an enumeration describing the available options.void
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
(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.
-
字段详细资料
-
MIN
public static final int MINIndex of min value in an array of attributes' range.- 另请参阅:
-
MAX
public static final int MAXIndex of max value in an array of attributes' range.- 另请参阅:
-
WIDTH
public static final int WIDTHIndex of width value (max-min) in an array of attributes' range.- 另请参阅:
-
-
构造器详细资料
-
KDTreeNodeSplitter
public KDTreeNodeSplitter()default constructor. -
KDTreeNodeSplitter
Creates a new instance of KDTreeNodeSplitter.- 参数:
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.
-
-
方法详细资料
-
listOptions
Returns an enumeration describing the available options.- 指定者:
listOptions
在接口中OptionHandler
- 返回:
- an enumeration of all the available options.
-
setOptions
Parses a given list of options.- 指定者:
setOptions
在接口中OptionHandler
- 参数:
options
- the list of options as an array of strings- 抛出:
Exception
- if an option is not supported
-
getOptions
Gets the current settings of the object.- 指定者:
getOptions
在接口中OptionHandler
- 返回:
- an array of strings suitable for passing to setOptions
-
splitNode
public abstract void splitNode(KDTreeNode node, int numNodesCreated, double[][] nodeRanges, double[][] universe) throws Exception Splits a node into two. After splitting two new nodes are created and correctly initialised. And, node.left and node.right are set appropriately.- 参数:
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.
-
setInstances
Sets the training instances on which the tree is (or is to be) built.- 参数:
inst
- The training instances.
-
setInstanceList
public void setInstanceList(int[] instList) Sets the master index array containing indices of the training instances. This array will be rearranged as the tree is built, so that each node is assigned a portion in this array which contain the instances insides the node's region.- 参数:
instList
- The master index array.
-
setEuclideanDistanceFunction
Sets the EuclideanDistance object to use for splitting nodes.- 参数:
func
- The EuclideanDistance object.
-
setNodeWidthNormalization
public void setNodeWidthNormalization(boolean normalize) Sets whether if a nodes region is normalized or not. If set to true then, when selecting the widest attribute/dimension for splitting, the width of each attribute/dimension, of the points inside the node's region, is divided by the width of that attribute/dimension for the whole point-space. Thus, each attribute/dimension of that node is normalized.- 参数:
normalize
- Should be true if normalization is required.
-
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 返回:
- the revision
-