|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weka.classifiers.trees.adtree.Splitter | +--weka.classifiers.trees.adtree.TwoWayNominalSplit
Class representing a two-way split on a nominal attribute, of the form: either 'is some_value' or 'is not some_value'.
Field Summary |
Fields inherited from class weka.classifiers.trees.adtree.Splitter |
orderAdded |
Constructor Summary | |
TwoWayNominalSplit(int _attIndex,
int _trueSplitValue)
Creates a new two-way nominal splitter. |
Method Summary | |
java.lang.String |
attributeString(Instances dataset)
Gets the string describing the attributes the split depends on. |
int |
branchInstanceGoesDown(Instance inst)
Gets the index of the branch that an instance applies to. |
java.lang.Object |
clone()
Clones this node. |
java.lang.String |
comparisonString(int branchNum,
Instances dataset)
Gets the string describing the comparision the split depends on for a particular branch. |
boolean |
equalTo(Splitter compare)
Tests whether two splitters are equivalent. |
PredictionNode |
getChildForBranch(int branchNum)
Gets the child for a branch of the split. |
int |
getNumOfBranches()
Gets the number of branches of the split. |
ReferenceInstances |
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. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TwoWayNominalSplit(int _attIndex, int _trueSplitValue)
_attIndex
- the index of the attribute this split depeneds on_trueSplitValue
- the attribute value that the splitter splits onMethod Detail |
public int getNumOfBranches()
getNumOfBranches
in class Splitter
public int branchInstanceGoesDown(Instance inst)
branchInstanceGoesDown
in class Splitter
inst
- the instance
public ReferenceInstances instancesDownBranch(int branch, Instances instances)
instancesDownBranch
in class Splitter
branch
- the index of the branchinstances
- the instances from which to find the subset
public java.lang.String attributeString(Instances dataset)
attributeString
in class Splitter
dataset
- the dataset that the split is based on
public java.lang.String comparisonString(int branchNum, Instances dataset)
comparisonString
in class Splitter
branchNum
- the branch of the splitdataset
- the dataset that the split is based on
public boolean equalTo(Splitter compare)
equalTo
in class Splitter
compare
- the splitter to compare with
public void setChildForBranch(int branchNum, PredictionNode childPredictor)
setChildForBranch
in class Splitter
branchNum
- the branch to set the child forchildPredictor
- the new childpublic PredictionNode getChildForBranch(int branchNum)
getChildForBranch
in class Splitter
branchNum
- the branch to get the child for
public java.lang.Object clone()
clone
in class Splitter
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2003 David Lindsay, Computer Learning Research Centre, Dept. Computer Science, Royal Holloway, University of London