public class GraftSplit
extends weka.classifiers.trees.j48.ClassifierSplitModel
implements java.lang.Comparable
| Constructor and Description |
|---|
GraftSplit(int a,
double v,
int t,
double c,
double l)
constructor
|
GraftSplit(int a,
double v,
int t,
double oC,
double[][] counts)
constructor
|
| Modifier and Type | Method and Description |
|---|---|
int |
attribute() |
void |
buildClassifier(weka.core.Instances data)
builds m_graftdistro using the passed data
|
double |
classProb(int classIndex,
weka.core.Instance instance,
int theSubset)
returns the probability for instance for the specified class
|
int |
compareTo(java.lang.Object g)
method needed for sorting a collection of GraftSplits by laplace value
|
void |
deleteGraftedCases(weka.core.Instances data)
deletes the cases in data that belong to leaf pointed to by
the test (i.e.
|
java.lang.String |
dumpLabelG(int index,
weka.core.Instances data)
Prints label for subset index of instances (eg class).
|
weka.classifiers.trees.j48.NoSplit |
getLeaf() |
weka.classifiers.trees.j48.NoSplit |
getOtherLeaf() |
java.lang.String |
getRevision()
Returns the revision string.
|
double |
laplaceForSubsetOfInterest() |
java.lang.String |
leftSide(weka.core.Instances data)
Prints left side of condition satisfied by instances.
|
int |
maxClassForSubsetOfInterest() |
double |
positives(int subset) |
double |
positivesForSubsetOfInterest() |
java.lang.String |
rightSide(int index,
weka.core.Instances data)
Prints condition satisfied by instances in subset index.
|
java.lang.String |
sourceExpression(int index,
weka.core.Instances data)
Returns a string containing java source code equivalent to the test
made at this node.
|
double |
splitPoint() |
int |
subsetOfInterest() |
int |
testType()
returns the test type
|
java.lang.String |
toString(weka.core.Instances data)
method for returning information about this GraftSplit
|
double |
totalForSubset(int subset) |
double |
totalForSubsetOfInterest() |
double[] |
weights(weka.core.Instance instance) |
int |
whichSubset(weka.core.Instance instance) |
public GraftSplit(int a,
double v,
int t,
double c,
double l)
a - the attribute to split onv - the value of a where split occurst - the test type (0 is <=, 1 is >, 2 is =, 3 is !)c - the class to label the leaf node pointed to by test as.l - the laplace value (needed when sorting GraftSplits)public GraftSplit(int a,
double v,
int t,
double oC,
double[][] counts)
throws java.lang.Exception
a - the attribute to split onv - the value of a where split occurst - the test type (0 is <=, 1 is >, 2 is =, 3 is !=)oC - the class to label the leaf node not pointed to by test as.counts - the distribution for this splitjava.lang.Exceptionpublic void deleteGraftedCases(weka.core.Instances data)
data - the instances to delete frompublic void buildClassifier(weka.core.Instances data)
throws java.lang.Exception
buildClassifier in class weka.classifiers.trees.j48.ClassifierSplitModeldata - the instances to use when creating the distributionjava.lang.Exceptionpublic weka.classifiers.trees.j48.NoSplit getLeaf()
public weka.classifiers.trees.j48.NoSplit getOtherLeaf()
public final java.lang.String dumpLabelG(int index,
weka.core.Instances data)
throws java.lang.Exception
index - the bag to dump label fordata - to get attribute names and suchjava.lang.Exception - if something goes wrongpublic int subsetOfInterest()
public double positivesForSubsetOfInterest()
public double positives(int subset)
subset - the subset to get the positives forpublic double totalForSubsetOfInterest()
public double totalForSubset(int subset)
subset - the index of the bag to get the total forpublic java.lang.String leftSide(weka.core.Instances data)
leftSide in class weka.classifiers.trees.j48.ClassifierSplitModeldata - the data.public int attribute()
public final java.lang.String rightSide(int index,
weka.core.Instances data)
rightSide in class weka.classifiers.trees.j48.ClassifierSplitModelpublic final java.lang.String sourceExpression(int index,
weka.core.Instances data)
sourceExpression in class weka.classifiers.trees.j48.ClassifierSplitModelindex - index of the nominal value testeddata - the data containing instance structure infopublic double[] weights(weka.core.Instance instance)
weights in class weka.classifiers.trees.j48.ClassifierSplitModelinstance - the instance to produce the weights forpublic int whichSubset(weka.core.Instance instance)
whichSubset in class weka.classifiers.trees.j48.ClassifierSplitModelinstance - the instance for which to determine the subsetpublic double splitPoint()
public int maxClassForSubsetOfInterest()
public double laplaceForSubsetOfInterest()
public int testType()
public int compareTo(java.lang.Object g)
compareTo in interface java.lang.Comparableg - the graft split to compare to this onepublic final double classProb(int classIndex,
weka.core.Instance instance,
int theSubset)
throws java.lang.Exception
classProb in class weka.classifiers.trees.j48.ClassifierSplitModelclassIndex - the index of the classinstance - the instance to get the probability fortheSubset - the subsetjava.lang.Exceptionpublic java.lang.String toString(weka.core.Instances data)
data - instances for determining names of attributes and valuespublic java.lang.String getRevision()
getRevision in interface weka.core.RevisionHandler