Class Prism

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, CapabilitiesHandler, OptionHandler, RevisionHandler, TechnicalInformationHandler

    public class Prism
    extends Classifier
    implements 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: 5529 $
    Author:
    Ian H. Witten (ihw@cs.waikato.ac.nz)
    See Also:
    Serialized Form
    • Constructor Detail

      • Prism

        public Prism()
    • Method Detail

      • globalInfo

        public java.lang.String globalInfo()
        Returns a string describing classifier
        Returns:
        a description suitable for displaying in the explorer/experimenter gui
      • getTechnicalInformation

        public 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 TechnicalInformationHandler
        Returns:
        the technical information about this class
      • classifyInstance

        public double classifyInstance​(Instance inst)
        Classifies a given instance.
        Overrides:
        classifyInstance in class Classifier
        Parameters:
        inst - the instance to be classified
        Returns:
        the classification
      • buildClassifier

        public void buildClassifier​(Instances data)
                             throws java.lang.Exception
        Generates the classifier.
        Specified by:
        buildClassifier in class Classifier
        Parameters:
        data - the data to be used
        Throws:
        java.lang.Exception - if the classifier can't built successfully
      • toString

        public java.lang.String toString()
        Prints a description of the classifier.
        Overrides:
        toString in class java.lang.Object
        Returns:
        a description of the classifier as a string
      • main

        public static void main​(java.lang.String[] args)
        Main method for testing this class
        Parameters:
        args - the commandline parameters