Package weka.classifiers.rules.part

# 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: 1.13 $
Author:
  Eibe Frank (eibe@cs.waikato.ac.nz)
See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`ClassifierDecList(ModelSelection toSelectLocModel, int minNum)`
Constructor - just calls constructor of class DecList.

## Method Summary

Modifier and Type
Method
Description
`void`
`buildDecList(Instances data, boolean leaf)`
Builds the partial tree without hold out set.
`void`
`buildRule(Instances data)`
Method for building a pruned partial tree.
`final int`
`chooseIndex()`
Method for choosing a subset to expand.
`final int`
`chooseLastIndex()`
Choose last index (ie.
`double`
`classifyInstance(Instance instance)`
Classifies an instance.
`final void`
`cleanup(Instances justHeaderInfo)`
Cleanup in order to save memory.
`final double[]`
`distributionForInstance(Instance instance)`
Returns class probabilities for a weighted instance.
`String`
`getRevision()`
Returns the revision string.
`String`
`toString()`
Prints rules.
`double`
`weight(Instance instance)`
Returns the weight a rule assigns to an instance.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

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