Class 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 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 model
        pruneTree - true if the tree is to be pruned
        cf - 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:
        buildClassifier in class ClassifierTree
        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.Exception
        Prunes 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:
        getNewTree in class ClassifierTree
        Parameters:
        data - the training data
        Throws:
        java.lang.Exception - if something goes wrong