Class PruneableClassifierTree

    • 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 model
        pruneTree - true if the tree is to be pruned
        num - number of subsets of equal size
        cleanup -
        seed - the seed value to use
        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
        Parameters:
        data - the data to build the tree from
        Throws:
        java.lang.Exception - if tree can't be built successfully
      • prune

        public void prune()
                   throws java.lang.Exception
        Prunes a tree.
        Throws:
        java.lang.Exception - if tree can't be pruned successfully