public class C45PruneableClassifierTree extends ClassifierTree
m_id, m_isEmpty, m_isLeaf, m_localModel, m_sons, m_test, m_toSelectModel, m_trainBayesNet, Newick, NOT_DRAWABLE, TREE| Constructor and Description |
|---|
C45PruneableClassifierTree(ModelSelection toSelectLocModel,
boolean pruneTree,
float cf,
boolean raiseTree,
boolean cleanup)
Constructor for pruneable tree structure.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
Capabilities |
getCapabilities()
Returns default capabilities of the classifier tree.
|
protected ClassifierTree |
getNewTree(Instances data)
Returns a newly created tree.
|
String |
getRevision()
Returns the revision string.
|
void |
prune()
Prunes a tree using C4.5's pruning procedure.
|
assignIDs, buildTree, buildTree, classifyInstance, cleanup, distributionForInstance, getNewTree, graph, graphType, nextID, numLeaves, numNodes, prefix, resetID, toSource, toStringpublic C45PruneableClassifierTree(ModelSelection toSelectLocModel, boolean pruneTree, float cf, boolean raiseTree, boolean cleanup) throws Exception
toSelectLocModel - selection method for local splitting modelpruneTree - true if the tree is to be prunedcf - the confidence factor for pruningraiseTree - cleanup - Exception - if something goes wrongpublic Capabilities getCapabilities()
getCapabilities in interface CapabilitiesHandlergetCapabilities in class ClassifierTreeCapabilitiespublic void buildClassifier(Instances data) throws Exception
buildClassifier in class ClassifierTreedata - the data for building the treeException - if something goes wrongpublic final void collapse()
public void prune()
throws Exception
Exception - if something goes wrongprotected ClassifierTree getNewTree(Instances data) throws Exception
getNewTree in class ClassifierTreedata - the data to work withException - if something goes wrongpublic String getRevision()
getRevision in interface RevisionHandlergetRevision in class ClassifierTreeCopyright © 2015 University of Waikato, Hamilton, NZ. All rights reserved.