public class C45PruneableClassifierTreeG extends ClassifierTree
BayesNet, Newick, NOT_DRAWABLE, TREE| Constructor and Description |
|---|
C45PruneableClassifierTreeG(ModelSelection toSelectLocModel,
boolean pruneTree,
float cf,
boolean raiseTree,
boolean relabel,
boolean cleanup)
Constructor for pruneable tree structure.
|
C45PruneableClassifierTreeG(ModelSelection toSelectLocModel,
Instances data,
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(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(Instances data)
Initializes variables for grafting.
|
Capabilities |
getCapabilities()
Returns default capabilities of the classifier tree.
|
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.
|
assignIDs, buildTree, buildTree, classifyInstance, cleanup, distributionForInstance, graph, graphType, numLeaves, numNodes, prefix, toSourcepublic C45PruneableClassifierTreeG(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(ModelSelection toSelectLocModel, Instances data, 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 Capabilities getCapabilities()
getCapabilities in interface CapabilitiesHandlergetCapabilities in class ClassifierTreeCapabilitiespublic void buildClassifier(Instances data) throws java.lang.Exception
buildClassifier in class ClassifierTreedatathe - 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(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
double - x, double n, double r.java.lang.Exceptionpublic java.lang.String toString()
toString in class ClassifierTreepublic java.lang.String getRevision()
getRevision in interface RevisionHandlergetRevision in class ClassifierTree