Class ClassifierDecList

java.lang.Object
weka.classifiers.rules.part.ClassifierDecList
All Implemented Interfaces:
Serializable, RevisionHandler
Direct Known Subclasses:
C45PruneableDecList, PruneableDecList

public class ClassifierDecList extends Object implements Serializable, RevisionHandler
Class for handling a rule (partial tree) for a decision list.
Version:
$Revision: 10153 $
Author:
Eibe Frank (eibe@cs.waikato.ac.nz)
See Also:
  • Constructor Details

    • ClassifierDecList

      public ClassifierDecList(ModelSelection toSelectLocModel, int minNum)
      Constructor - just calls constructor of class DecList.
  • Method Details

    • buildRule

      public void buildRule(Instances data) throws Exception
      Method for building a pruned partial tree.
      Throws:
      Exception - if something goes wrong
    • buildDecList

      public void buildDecList(Instances data, boolean leaf) throws Exception
      Builds the partial tree without hold out set.
      Throws:
      Exception - if something goes wrong
    • classifyInstance

      public double classifyInstance(Instance instance) throws Exception
      Classifies an instance.
      Throws:
      Exception - if something goes wrong
    • distributionForInstance

      public final double[] distributionForInstance(Instance instance) throws Exception
      Returns class probabilities for a weighted instance.
      Throws:
      Exception - if something goes wrong
    • weight

      public double weight(Instance instance) throws Exception
      Returns the weight a rule assigns to an instance.
      Throws:
      Exception - if something goes wrong
    • cleanup

      public final void cleanup(Instances justHeaderInfo)
      Cleanup in order to save memory.
    • toString

      public String toString()
      Prints rules.
      Overrides:
      toString in class Object
    • chooseIndex

      public final int chooseIndex()
      Method for choosing a subset to expand.
    • chooseLastIndex

      public final int chooseLastIndex()
      Choose last index (ie. choose rule).
    • getRevision

      public String getRevision()
      Returns the revision string.
      Specified by:
      getRevision in interface RevisionHandler
      Returns:
      the revision