public class GraftSplit extends 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(Instances data)builds m_graftdistro using the passed data | 
| double | classProb(int classIndex,
         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(Instances data)deletes the cases in data that belong to leaf pointed to by
 the test (i.e. | 
| java.lang.String | dumpLabelG(int index,
          Instances data)Prints label for subset index of instances (eg class). | 
| NoSplit | getLeaf() | 
| NoSplit | getOtherLeaf() | 
| java.lang.String | getRevision()Returns the revision string. | 
| double | laplaceForSubsetOfInterest() | 
| java.lang.String | leftSide(Instances data)Prints left side of condition satisfied by instances. | 
| int | maxClassForSubsetOfInterest() | 
| double | positives(int subset) | 
| double | positivesForSubsetOfInterest() | 
| java.lang.String | rightSide(int index,
         Instances data)Prints condition satisfied by instances in subset index. | 
| java.lang.String | sourceExpression(int index,
                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(Instances data)method for returning information about this GraftSplit | 
| double | totalForSubset(int subset) | 
| double | totalForSubsetOfInterest() | 
| double[] | weights(Instance instance)Returns weights if instance is assigned to more than one subset. | 
| int | whichSubset(Instance instance)Returns index of subset instance is assigned to. | 
checkModel, classifyInstance, classProbLaplace, clone, codingCost, distribution, dumpLabel, dumpModel, numSubsets, resetDistribution, sourceClass, splitpublic 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(Instances data)
data - the instances to delete frompublic void buildClassifier(Instances data) throws java.lang.Exception
buildClassifier in class ClassifierSplitModeldata - the instances to use when creating the distributionjava.lang.Exception - if something goes wrongpublic NoSplit getLeaf()
public NoSplit getOtherLeaf()
public final java.lang.String dumpLabelG(int index,
                                         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(Instances data)
leftSide in class ClassifierSplitModeldata - the data.public int attribute()
public final java.lang.String rightSide(int index,
                                        Instances data)
rightSide in class ClassifierSplitModelpublic final java.lang.String sourceExpression(int index,
                                               Instances data)
sourceExpression in class ClassifierSplitModelindex - index of the nominal value testeddata - the data containing instance structure infopublic double[] weights(Instance instance)
ClassifierSplitModelweights in class ClassifierSplitModelinstance - the instance to produce the weights forpublic int whichSubset(Instance instance)
ClassifierSplitModelwhichSubset in class 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,
                              Instance instance,
                              int theSubset)
                       throws java.lang.Exception
classProb in class ClassifierSplitModelclassIndex - the index of the classinstance - the instance to get the probability fortheSubset - the subsetjava.lang.Exception - if something goes wrongpublic java.lang.String toString(Instances data)
data - instances for determining names of attributes and valuespublic java.lang.String getRevision()
getRevision in interface RevisionHandler