public class C45PruneableClassifierTreeG
extends weka.classifiers.trees.j48.ClassifierTree
| Constructor and Description |
|---|
C45PruneableClassifierTreeG(weka.classifiers.trees.j48.ModelSelection toSelectLocModel,
boolean pruneTree,
float cf,
boolean raiseTree,
boolean relabel,
boolean cleanup)
Constructor for pruneable tree structure.
|
C45PruneableClassifierTreeG(weka.classifiers.trees.j48.ModelSelection toSelectLocModel,
weka.core.Instances data,
weka.classifiers.trees.j48.ClassifierSplitModel gs,
boolean prune,
float cf,
boolean raise,
boolean isLeaf,
boolean relabel,
boolean cleanup)
Constructor for pruneable tree structure.
|
| Modifier and Type | Method and Description |
|---|---|
double |
biprob(double x,
double n,
double r)
Significance test
|
void |
buildClassifier(weka.core.Instances data)
Method for building a pruneable classifier tree.
|
void |
collapse()
Collapses a tree to a node if training error doesn't increase.
|
void |
doGrafting(weka.core.Instances data)
Initializes variables for grafting.
|
java.lang.String |
getRevision()
Returns the revision string.
|
void |
prune()
Prunes a tree using C4.5's pruning procedure.
|
void |
setDescendents(java.util.ArrayList t,
C45PruneableClassifierTreeG originalLeaf)
add the grafted nodes at originalLeaf's position in tree.
|
java.lang.String |
toString()
Prints tree structure.
|
public C45PruneableClassifierTreeG(weka.classifiers.trees.j48.ModelSelection toSelectLocModel,
boolean pruneTree,
float cf,
boolean raiseTree,
boolean relabel,
boolean cleanup)
throws java.lang.Exception
toSelectLocModel - selection method for local splitting modelpruneTree - true if the tree is to be prunedcf - the confidence factor for pruningraiseTree - cleanup - java.lang.Exception - if something goes wrongpublic C45PruneableClassifierTreeG(weka.classifiers.trees.j48.ModelSelection toSelectLocModel,
weka.core.Instances data,
weka.classifiers.trees.j48.ClassifierSplitModel gs,
boolean prune,
float cf,
boolean raise,
boolean isLeaf,
boolean relabel,
boolean cleanup)
toSelectLocModel - selection method for local splitting modeldata - the dta used to produce split modelgs - the split modelprune - true if the tree is to be prunedcf - the confidence factor for pruningraise - isLeaf - if this node is a leaf or notrelabel - whether relabeling occuredcleanup - java.lang.Exception - if something goes wrongpublic void buildClassifier(weka.core.Instances data)
throws java.lang.Exception
buildClassifier in class weka.classifiers.trees.j48.ClassifierTreedata - the data for building the treejava.lang.Exception - if something goes wrongpublic final void collapse()
public void prune()
throws java.lang.Exception
java.lang.Exception - if something goes wrongpublic void doGrafting(weka.core.Instances data)
throws java.lang.Exception
data - the data for the treejava.lang.Exception - if anything goes wrongpublic void setDescendents(java.util.ArrayList t,
C45PruneableClassifierTreeG originalLeaf)
t - the list of nodes to graftoriginalLeaf - the leaf that the grafts are replacingpublic double biprob(double x,
double n,
double r)
throws java.lang.Exception
x - n - r - java.lang.Exceptionpublic java.lang.String toString()
toString in class weka.classifiers.trees.j48.ClassifierTreepublic java.lang.String getRevision()
getRevision in interface weka.core.RevisionHandlergetRevision in class weka.classifiers.trees.j48.ClassifierTree