weka.classifiers.rules.part
Class MakeDecList

java.lang.Object
  extended by weka.classifiers.rules.part.MakeDecList
All Implemented Interfaces:
Serializable, CapabilitiesHandler, RevisionHandler

public class MakeDecList
extends Object
implements Serializable, CapabilitiesHandler, RevisionHandler

Class for handling a decision list.

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

Constructor Summary
MakeDecList(ModelSelection toSelectLocModel, double cf, int minNum)
          Constructor for dec list pruned using C4.5 pruning.
MakeDecList(ModelSelection toSelectLocModel, int minNum)
          Constructor for unpruned dec list.
MakeDecList(ModelSelection toSelectLocModel, int num, int minNum, int seed)
          Constructor for dec list pruned using hold-out pruning.
 
Method Summary
 void buildClassifier(Instances data)
          Builds dec list.
 double classifyInstance(Instance instance)
          Classifies an instance.
 double[] distributionForInstance(Instance instance)
          Returns the class distribution for an instance.
 Capabilities getCapabilities()
          Returns default capabilities of the classifier.
 String getRevision()
          Returns the revision string.
 int numRules()
          Outputs the number of rules in the classifier.
 String toString()
          Outputs the classifier into a string.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MakeDecList

public MakeDecList(ModelSelection toSelectLocModel,
                   int minNum)
Constructor for unpruned dec list.


MakeDecList

public MakeDecList(ModelSelection toSelectLocModel,
                   double cf,
                   int minNum)
Constructor for dec list pruned using C4.5 pruning.


MakeDecList

public MakeDecList(ModelSelection toSelectLocModel,
                   int num,
                   int minNum,
                   int seed)
Constructor for dec list pruned using hold-out pruning.

Method Detail

getCapabilities

public Capabilities getCapabilities()
Returns default capabilities of the classifier.

Specified by:
getCapabilities in interface CapabilitiesHandler
Returns:
the capabilities of this classifier
See Also:
Capabilities

buildClassifier

public void buildClassifier(Instances data)
                     throws Exception
Builds dec list.

Throws:
Exception - if dec list can't be built successfully

toString

public String toString()
Outputs the classifier into a string.

Overrides:
toString in class Object

classifyInstance

public double classifyInstance(Instance instance)
                        throws Exception
Classifies an instance.

Throws:
Exception - if instance can't be classified

distributionForInstance

public double[] distributionForInstance(Instance instance)
                                 throws Exception
Returns the class distribution for an instance.

Throws:
Exception - if distribution can't be computed

numRules

public int numRules()
Outputs the number of rules in the classifier.


getRevision

public String getRevision()
Returns the revision string.

Specified by:
getRevision in interface RevisionHandler
Returns:
the revision


Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.