weka.classifiers.rules
Class Prism

java.lang.Object
  extended by weka.classifiers.AbstractClassifier
      extended by weka.classifiers.rules.Prism
All Implemented Interfaces:
Serializable, Cloneable, weka.classifiers.Classifier, weka.core.CapabilitiesHandler, weka.core.OptionHandler, weka.core.RevisionHandler, weka.core.TechnicalInformationHandler

public class Prism
extends weka.classifiers.AbstractClassifier
implements weka.core.TechnicalInformationHandler

Class for building and using a PRISM rule set for classification. Can only deal with nominal attributes. Can't deal with missing values. Doesn't do any pruning.

For more information, see

J. Cendrowska (1987). PRISM: An algorithm for inducing modular rules. International Journal of Man-Machine Studies. 27(4):349-370.

BibTeX:

 @article{Cendrowska1987,
    author = {J. Cendrowska},
    journal = {International Journal of Man-Machine Studies},
    number = {4},
    pages = {349-370},
    title = {PRISM: An algorithm for inducing modular rules},
    volume = {27},
    year = {1987}
 }
 

Valid options are:

 -D
  If set, classifier is run in debug mode and
  may output additional info to the console

Version:
$Revision: 8109 $
Author:
Ian H. Witten (ihw@cs.waikato.ac.nz)
See Also:
Serialized Form

Constructor Summary
Prism()
           
 
Method Summary
 void buildClassifier(weka.core.Instances data)
          Generates the classifier.
 double classifyInstance(weka.core.Instance inst)
          Classifies a given instance.
 weka.core.Capabilities getCapabilities()
          Returns default capabilities of the classifier.
 String getRevision()
          Returns the revision string.
 weka.core.TechnicalInformation getTechnicalInformation()
          Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on.
 String globalInfo()
          Returns a string describing classifier
static void main(String[] args)
          Main method for testing this class
 String toString()
          Prints a description of the classifier.
 
Methods inherited from class weka.classifiers.AbstractClassifier
debugTipText, distributionForInstance, forName, getDebug, getOptions, listOptions, makeCopies, makeCopy, runClassifier, setDebug, setOptions
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Prism

public Prism()
Method Detail

globalInfo

public String globalInfo()
Returns a string describing classifier

Returns:
a description suitable for displaying in the explorer/experimenter gui

getTechnicalInformation

public weka.core.TechnicalInformation getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on.

Specified by:
getTechnicalInformation in interface weka.core.TechnicalInformationHandler
Returns:
the technical information about this class

classifyInstance

public double classifyInstance(weka.core.Instance inst)
Classifies a given instance.

Specified by:
classifyInstance in interface weka.classifiers.Classifier
Overrides:
classifyInstance in class weka.classifiers.AbstractClassifier
Parameters:
inst - the instance to be classified
Returns:
the classification

getCapabilities

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

Specified by:
getCapabilities in interface weka.classifiers.Classifier
Specified by:
getCapabilities in interface weka.core.CapabilitiesHandler
Overrides:
getCapabilities in class weka.classifiers.AbstractClassifier
Returns:
the capabilities of this classifier

buildClassifier

public void buildClassifier(weka.core.Instances data)
                     throws Exception
Generates the classifier.

Specified by:
buildClassifier in interface weka.classifiers.Classifier
Parameters:
data - the data to be used
Throws:
Exception - if the classifier can't built successfully

toString

public String toString()
Prints a description of the classifier.

Overrides:
toString in class Object
Returns:
a description of the classifier as a string

getRevision

public String getRevision()
Returns the revision string.

Specified by:
getRevision in interface weka.core.RevisionHandler
Overrides:
getRevision in class weka.classifiers.AbstractClassifier
Returns:
the revision

main

public static void main(String[] args)
Main method for testing this class

Parameters:
args - the commandline parameters


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