|
||||||||||
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.C45PruneableClassifierTree
Class for handling a tree structure that can be pruned using C4.5 procedures.
Field Summary |
Fields inherited from class weka.classifiers.trees.j48.ClassifierTree |
m_id, m_isEmpty, m_isLeaf, m_localModel, m_sons, m_test, m_toSelectModel, m_train |
Constructor Summary | |
C45PruneableClassifierTree(ModelSelection toSelectLocModel,
boolean pruneTree,
float cf,
boolean raiseTree,
boolean cleanup)
Constructor for pruneable tree structure. |
Method Summary | |
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. |
void |
prune()
Prunes a tree using C4.5's pruning procedure. |
Methods inherited from class weka.classifiers.trees.j48.ClassifierTree |
assignIDs, buildTree, buildTree, classifyInstance, cleanup, distributionForInstance, getNewTree, graph, nextID, numLeaves, numNodes, prefix, resetID, toSource, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public C45PruneableClassifierTree(ModelSelection toSelectLocModel, boolean pruneTree, float cf, boolean raiseTree, 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 pruning
java.lang.Exception
- if something goes wrongMethod Detail |
public void buildClassifier(Instances data) throws java.lang.Exception
buildClassifier
in class ClassifierTree
java.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 ClassifierTree
data
- the training data
java.lang.Exception
- if something goes wrong
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |