Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weka.classifiers.trees.j48
Class C45PruneableClassifierTree

    java.lang.Object
      weka.classifiers.trees.j48.ClassifierTree
          weka.classifiers.trees.j48.C45PruneableClassifierTree

All Implemented Interfaces:
  java.io.Serializable, CapabilitiesHandler, Drawable, RevisionHandler

    public class C45PruneableClassifierTree

extends ClassifierTree

Class for handling a tree structure that can be pruned using C4.5 procedures.

Version:
  $Revision: 6073 $
Author:
  Eibe Frank (eibe@cs.waikato.ac.nz)
See Also:
  Serialized Form

Field Summary

Fields inherited from interface weka.core.Drawable
`BayesNet, Newick, NOT_DRAWABLE, TREE`

Constructor Summary
`C45PruneableClassifierTree(ModelSelection toSelectLocModel, boolean pruneTree, float cf, boolean raiseTree, boolean cleanup, boolean collapseTree)` 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.
`Capabilities` | `getCapabilities()` Returns default capabilities of the classifier tree.
`java.lang.String` | `getRevision()` Returns the revision string.
`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, graph, graphType, numLeaves, numNodes, prefix, toSource, toString`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### C45PruneableClassifierTree

    public C45PruneableClassifierTree(ModelSelection toSelectLocModel,
                                      boolean pruneTree,
                                      float cf,
                                      boolean raiseTree,
                                      boolean cleanup,
                                      boolean collapseTree)
                               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
    `raiseTree` -
    `cleanup` -
  Throws:
    `java.lang.Exception` - if something goes wrong

Method Detail

### getCapabilities

    public Capabilities getCapabilities()

  Returns default capabilities of the classifier tree.

  Specified by:
    `getCapabilities` in interface `CapabilitiesHandler`
  Overrides:
    `getCapabilities` in class `ClassifierTree`
  Returns:
    the capabilities of this classifier tree
  See Also:
    `Capabilities`

### 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 for building the tree
  Throws:
    `java.lang.Exception` - if something goes wrong

### collapse

    public final void collapse()

  Collapses a tree to a node if training error doesn't increase.

### 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

### getRevision

    public java.lang.String getRevision()

  Returns the revision string.

  Specified by:
    `getRevision` in interface `RevisionHandler`
  Overrides:
    `getRevision` in class `ClassifierTree`
  Returns:
    the revision

Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD