Class C45PruneableClassifierTree
- java.lang.Object
-
- org.processmining.plugins.workshop.Yaguang.WekaDiscriminationTree.ClassifierTree
-
- org.processmining.plugins.workshop.Yaguang.WekaDiscriminationTree.C45PruneableClassifierTree
-
- All Implemented Interfaces:
java.io.Serializable,Drawable
public class C45PruneableClassifierTree extends ClassifierTree
Class for handling a tree structure that can be pruned using C4.5 procedures.- Version:
- $Revision: 1.11 $
- Author:
- Eibe Frank (eibe@cs.waikato.ac.nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected intdcIndexstatic double[][]discstatic doubleerrorsstatic intleafIDstatic double[][]leafRankprotected intndcIndexstatic intsaDepIndexstatic intsaFavIndexstatic inttopLeafstatic doubletotalstatic doubletotal_changes-
Fields inherited from class org.processmining.plugins.workshop.Yaguang.WekaDiscriminationTree.ClassifierTree
m_id, m_isChanged, m_isDifferent, m_isEmpty, m_isLeaf, m_localModel, m_sons, m_test, m_toSelectModel, m_train
-
Fields inherited from interface org.processmining.plugins.workshop.Yaguang.WekaDiscriminationTree.Drawable
BayesNet, NOT_DRAWABLE, TREE
-
-
Constructor Summary
Constructors Constructor Description C45PruneableClassifierTree(ModelSelection toSelectLocModel, boolean pruneTree, float cf, boolean raiseTree, boolean cleanup)Constructor for pruneable tree structure.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbuildClassifier(Instances data)Method for building a pruneable classifier tree.voidchangeLeaf()voidcollapse()protected voidgetDiscForTree()protected ClassifierTreegetNewTree(Instances data)Returns a newly created tree.voidinfoDiscriminationTree()voidleafRanking()voidprune()Prunes a tree using C4.5's pruning procedure.voidrelabeling()method to remove dependency by changing the labels of tree leaves.voidsetDiscParam(Instances data)-
Methods inherited from class org.processmining.plugins.workshop.Yaguang.WekaDiscriminationTree.ClassifierTree
assignIDs, buildTree, buildTree, classifyInstance, cleanup, color, distributionForInstance, doChangeLeafLabels, doDistributionForInstance, doRelabel, doRemoveUselessNodes, getLabel, getNewTree, graph, graphType, isLeaf, nextID, numLeaves, numNodes, pickMaxIdx, prefix, resetID, setIsDifferent, toSource, toString
-
-
-
-
Field Detail
-
disc
public static double[][] disc
-
leafRank
public static double[][] leafRank
-
leafID
public static int leafID
-
topLeaf
public static int topLeaf
-
errors
public static double errors
-
total
public static double total
-
total_changes
public static double total_changes
-
dcIndex
protected int dcIndex
-
ndcIndex
protected int ndcIndex
-
saDepIndex
public static int saDepIndex
-
saFavIndex
public static int saFavIndex
-
-
Constructor Detail
-
C45PruneableClassifierTree
public C45PruneableClassifierTree(ModelSelection toSelectLocModel, boolean pruneTree, float cf, boolean raiseTree, boolean cleanup) throws java.lang.Exception
Constructor for pruneable tree structure. Stores reference to associated training data at each node.- Parameters:
toSelectLocModel- selection method for local splitting modelpruneTree- true if the tree is to be prunedcf- the confidence factor for pruning- Throws:
java.lang.Exception- if something goes wrong
-
-
Method Detail
-
buildClassifier
public void buildClassifier(Instances data) throws java.lang.Exception
Method for building a pruneable classifier tree.- Overrides:
buildClassifierin classClassifierTree- Throws:
java.lang.Exception- if something goes wrong
-
setDiscParam
public void setDiscParam(Instances data)
-
relabeling
public void relabeling()
method to remove dependency by changing the labels of tree leaves.
-
changeLeaf
public void changeLeaf()
-
leafRanking
public void leafRanking()
-
getDiscForTree
protected void getDiscForTree()
-
infoDiscriminationTree
public void infoDiscriminationTree()
-
collapse
public final void collapse()
-
prune
public void prune() throws java.lang.ExceptionPrunes a tree using C4.5's pruning procedure.- Throws:
java.lang.Exception- if something goes wrong
-
getNewTree
protected ClassifierTree getNewTree(Instances data) throws java.lang.Exception
Returns a newly created tree.- Overrides:
getNewTreein classClassifierTree- Parameters:
data- the training data- Throws:
java.lang.Exception- if something goes wrong
-
-