|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.classifiers.trees.j48.ClassifierTree
weka.classifiers.trees.j48.C45PruneableClassifierTreeG
public class C45PruneableClassifierTreeG
Class for handling a tree structure that can be pruned using C4.5 procedures and have nodes grafted on.
| Field Summary |
|---|
| Fields inherited from interface weka.core.Drawable |
|---|
BayesNet, Newick, NOT_DRAWABLE, TREE |
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class weka.classifiers.trees.j48.ClassifierTree |
|---|
assignIDs, buildTree, buildTree, classifyInstance, cleanup, distributionForInstance, graph, graphType, numLeaves, numNodes, prefix, toSource |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public 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 wrong
public 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 wrong| Method Detail |
|---|
public Capabilities getCapabilities()
getCapabilities in interface CapabilitiesHandlergetCapabilities in class ClassifierTreeCapabilities
public void buildClassifier(Instances data)
throws java.lang.Exception
buildClassifier in class ClassifierTreedatathe - data for building the tree
java.lang.Exception - if something goes wrongpublic final void collapse()
public void prune()
throws java.lang.Exception
java.lang.Exception - if something goes wrong
public void doGrafting(Instances data)
throws java.lang.Exception
data - the data for the tree
java.lang.Exception - if anything goes wrong
public void setDescendents(java.util.ArrayList t,
C45PruneableClassifierTreeG originalLeaf)
t - the list of nodes to graftoriginalLeaf - the leaf that the grafts are replacing
public 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||