public class C45PruneableClassifierTree extends ClassifierTree
| Modifier and Type | Field and Description |
|---|---|
protected float |
m_CF
The confidence factor for pruning.
|
protected boolean |
m_cleanup
Cleanup after the tree has been built.
|
protected boolean |
m_collapseTheTree
True if the tree is to be collapsed.
|
protected boolean |
m_pruneTheTree
True if the tree is to be pruned.
|
protected boolean |
m_subtreeRaising
Is subtree raising to be performed?
|
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,
boolean collapseTree)
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.
|
protected ClassifierTree |
getNewTree(Instances data)
Returns a newly created tree.
|
java.lang.String |
getRevision()
Returns the revision string.
|
void |
prune()
Prunes a tree using C4.5's pruning procedure.
|
assignIDs, buildTree, buildTree, classifyInstance, cleanup, distributionForInstance, getCapabilities, getLocalModel, getMembershipValues, getNewTree, getSons, getTrainingData, graph, graphType, isLeaf, nextID, numLeaves, numNodes, prefix, resetID, toSource, toStringprotected boolean m_pruneTheTree
protected boolean m_collapseTheTree
protected float m_CF
protected boolean m_subtreeRaising
protected boolean m_cleanup
public C45PruneableClassifierTree(ModelSelection toSelectLocModel, boolean pruneTree, float cf, boolean raiseTree, boolean cleanup, boolean collapseTree) 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 void buildClassifier(Instances data) throws java.lang.Exception
buildClassifier in class 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 wrongprotected ClassifierTree getNewTree(Instances data) throws java.lang.Exception
getNewTree in class ClassifierTreedata - the data to work withjava.lang.Exception - if something goes wrongpublic java.lang.String getRevision()
getRevision in interface RevisionHandlergetRevision in class ClassifierTree