类 Splitter
java.lang.Object
weka.classifiers.trees.adtree.Splitter
- 所有已实现的接口:
Serializable
,Cloneable
,RevisionHandler
- 直接已知子类:
TwoWayNominalSplit
,TwoWayNumericSplit
Abstract class representing a splitter node in an alternating tree.
- 版本:
- $Revision: 1.5 $
- 作者:
- Richard Kirkby (rkirkby@cs.waikato.ac.nz)
- 另请参阅:
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明abstract String
attributeString
(Instances dataset) Gets the string describing the attributes the split depends on.abstract int
Gets the index of the branch that an instance applies to.abstract Object
clone()
Clones this node.abstract String
comparisonString
(int branchNum, Instances dataset) Gets the string describing the comparision the split depends on for a particular branch.abstract boolean
Tests whether two splitters are equivalent.abstract PredictionNode
getChildForBranch
(int branchNum) Gets the child for a branch of the split.abstract int
Gets the number of branches of the split.abstract ReferenceInstances
instancesDownBranch
(int branch, Instances sourceInstances) Gets the subset of instances that apply to a particluar branch of the split.abstract void
setChildForBranch
(int branchNum, PredictionNode childPredictor) Sets the child for a branch of the split.从接口继承的方法 weka.core.RevisionHandler
getRevision
-
字段详细资料
-
orderAdded
public int orderAddedThe number this node was in the order of nodes added to the tree
-
-
构造器详细资料
-
Splitter
public Splitter()
-
-
方法详细资料
-
getNumOfBranches
public abstract int getNumOfBranches()Gets the number of branches of the split.- 返回:
- the number of branches
-
branchInstanceGoesDown
Gets the index of the branch that an instance applies to. Returns -1 if no branches apply.- 参数:
i
- the instance- 返回:
- the branch index
-
instancesDownBranch
Gets the subset of instances that apply to a particluar branch of the split. If the branch index is -1, the subset will consist of those instances that don't apply to any branch.- 参数:
branch
- the index of the branchsourceInstances
- the instances from which to find the subset- 返回:
- the set of instances that apply
-
attributeString
Gets the string describing the attributes the split depends on. i.e. the left hand side of the description of the split.- 参数:
dataset
- the dataset that the split is based on- 返回:
- a string describing the attributes
-
comparisonString
Gets the string describing the comparision the split depends on for a particular branch. i.e. the right hand side of the description of the split.- 参数:
branchNum
- the branch of the splitdataset
- the dataset that the split is based on- 返回:
- a string describing the comparison
-
equalTo
Tests whether two splitters are equivalent.- 参数:
compare
- the splitter to compare with- 返回:
- whether or not they match
-
setChildForBranch
Sets the child for a branch of the split.- 参数:
branchNum
- the branch to set the child forchildPredictor
- the new child
-
getChildForBranch
Gets the child for a branch of the split.- 参数:
branchNum
- the branch to get the child for- 返回:
- the child
-
clone
Clones this node. Performs a deep copy, recursing through the tree.- 返回:
- a clone
-