Class PruneableClassifierTree
- java.lang.Object
-
- org.processmining.plugins.workshop.Yaguang.WekaDiscriminationTree.ClassifierTree
-
- org.processmining.plugins.workshop.Yaguang.WekaDiscriminationTree.PruneableClassifierTree
-
- All Implemented Interfaces:
java.io.Serializable,Drawable
public class PruneableClassifierTree extends ClassifierTree
Class for handling a tree structure that can be pruned using a pruning set.- Version:
- $Revision: 1.8 $
- 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 double[][]prunedTreeDiscstatic intsaDepIndexstatic intsaFavIndexstatic inttopLeafstatic doubletotalstatic doubletotal_changesstatic double[][]unprunedTreeDisc-
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 PruneableClassifierTree(ModelSelection toSelectLocModel, boolean pruneTree, int num, boolean cleanup, int seed)Constructor for pruneable tree structure.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbuildClassifier(Instances data)Method for building a pruneable classifier tree.voidchangeLeaf()protected voidgetDiscForTree()protected ClassifierTreegetNewTree(Instances train, Instances test)Returns a newly created tree.voidprune()Prunes a tree.voidrelabelingTreeGlobally()voidremoveDisc()static 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
-
unprunedTreeDisc
public static double[][] unprunedTreeDisc
-
prunedTreeDisc
public static double[][] prunedTreeDisc
-
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
-
PruneableClassifierTree
public PruneableClassifierTree(ModelSelection toSelectLocModel, boolean pruneTree, int num, boolean cleanup, int seed) 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 prunednum- number of subsets of equal size- 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 tree can't be built suleafIDessfully
-
setDiscParam
public static void setDiscParam(Instances data)
-
removeDisc
public void removeDisc()
-
changeLeaf
public void changeLeaf()
-
relabelingTreeGlobally
public void relabelingTreeGlobally()
-
getDiscForTree
protected void getDiscForTree()
-
prune
public void prune() throws java.lang.ExceptionPrunes a tree.- Throws:
java.lang.Exception- if tree can't be pruned suleafIDessfully
-
getNewTree
protected ClassifierTree getNewTree(Instances train, Instances test) throws java.lang.Exception
Returns a newly created tree.- Overrides:
getNewTreein classClassifierTree- Parameters:
data- and selection method for local models.- Throws:
java.lang.Exception- if something goes wrong
-
-