|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.classifiers.trees.adtree.Splitter
weka.classifiers.trees.adtree.TwoWayNumericSplit
public class TwoWayNumericSplit
Class representing a two-way split on a numeric attribute, of the form: either 'is < some_value' or 'is >= some_value'.
| Field Summary |
|---|
| Fields inherited from class weka.classifiers.trees.adtree.Splitter |
|---|
orderAdded |
| Constructor Summary | |
|---|---|
TwoWayNumericSplit(int _attIndex,
double _splitPoint)
Creates a new two-way numeric 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. |
java.lang.String |
getRevision()
Returns the revision string. |
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 TwoWayNumericSplit(int _attIndex,
double _splitPoint)
_attIndex - the index of the attribute this split depeneds on_splitPoint - the attribute value that the splitter splits on| Method Detail |
|---|
public int getNumOfBranches()
getNumOfBranches in class Splitterpublic int branchInstanceGoesDown(Instance inst)
branchInstanceGoesDown in class Splitterinst - the instance
public ReferenceInstances instancesDownBranch(int branch,
Instances instances)
instancesDownBranch in class Splitterbranch - the index of the branchinstances - the instances from which to find the subset
public java.lang.String attributeString(Instances dataset)
attributeString in class Splitterdataset - the dataset that the split is based on
public java.lang.String comparisonString(int branchNum,
Instances dataset)
comparisonString in class SplitterbranchNum - the branch of the splitdataset - the dataset that the split is based on
public boolean equalTo(Splitter compare)
equalTo in class Splittercompare - the splitter to compare with
public void setChildForBranch(int branchNum,
PredictionNode childPredictor)
setChildForBranch in class SplitterbranchNum - the branch to set the child forchildPredictor - the new childpublic PredictionNode getChildForBranch(int branchNum)
getChildForBranch in class SplitterbranchNum - the branch to get the child for
public java.lang.Object clone()
clone in class Splitterpublic java.lang.String getRevision()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||