类 TwoWayNominalSplit
java.lang.Object
weka.classifiers.trees.adtree.Splitter
weka.classifiers.trees.adtree.TwoWayNominalSplit
- 所有已实现的接口:
Serializable
,Cloneable
,RevisionHandler
Class representing a two-way split on a nominal attribute, of the form:
either 'is some_value' or 'is not some_value'.
- 版本:
- $Revision: 1.6 $
- 作者:
- Richard Kirkby (rkirkby@cs.waikato.ac.nz)
- 另请参阅:
-
字段概要
从类继承的字段 weka.classifiers.trees.adtree.Splitter
orderAdded
-
构造器概要
构造器构造器说明TwoWayNominalSplit
(int _attIndex, int _trueSplitValue) Creates a new two-way nominal splitter. -
方法概要
修饰符和类型方法说明attributeString
(Instances dataset) Gets the string describing the attributes the split depends on.int
Gets the index of the branch that an instance applies to.clone()
Clones this node.comparisonString
(int branchNum, Instances dataset) Gets the string describing the comparision the split depends on for a particular branch.boolean
Tests whether two splitters are equivalent.getChildForBranch
(int branchNum) Gets the child for a branch of the split.int
Gets the number of branches of the split.Returns the revision string.instancesDownBranch
(int branch, Instances instances) Gets the subset of instances that apply to a particluar branch of the split.void
setChildForBranch
(int branchNum, PredictionNode childPredictor) Sets the child for a branch of the split.
-
构造器详细资料
-
TwoWayNominalSplit
public TwoWayNominalSplit(int _attIndex, int _trueSplitValue) Creates a new two-way nominal splitter.- 参数:
_attIndex
- the index of the attribute this split depeneds on_trueSplitValue
- the attribute value that the splitter splits on
-
-
方法详细资料
-
getNumOfBranches
public int getNumOfBranches()Gets the number of branches of the split.- 指定者:
getNumOfBranches
在类中Splitter
- 返回:
- the number of branches (always = 2)
-
branchInstanceGoesDown
Gets the index of the branch that an instance applies to. Returns -1 if no branches apply.- 指定者:
branchInstanceGoesDown
在类中Splitter
- 参数:
inst
- 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.- 指定者:
instancesDownBranch
在类中Splitter
- 参数:
branch
- the index of the branchinstances
- 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.- 指定者:
attributeString
在类中Splitter
- 参数:
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.- 指定者:
comparisonString
在类中Splitter
- 参数:
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. -
setChildForBranch
Sets the child for a branch of the split.- 指定者:
setChildForBranch
在类中Splitter
- 参数:
branchNum
- the branch to set the child forchildPredictor
- the new child
-
getChildForBranch
Gets the child for a branch of the split.- 指定者:
getChildForBranch
在类中Splitter
- 参数:
branchNum
- the branch to get the child for- 返回:
- the child
-
clone
Clones this node. Performs a deep copy, recursing through the tree. -
getRevision
Returns the revision string.- 返回:
- the revision
-