Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weka.classifiers.rules
Class OLM

    java.lang.Object
      weka.classifiers.AbstractClassifier
          weka.classifiers.rules.OLM

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

    public class OLM

extends AbstractClassifier
implements OptionHandler, TechnicalInformationHandler

This class is an implementation of the Ordinal Learning Method (OLM).
Further information regarding the algorithm and variants can be found in:
Arie Ben-David (1992). Automatic Generation of Symbolic Multiattribute Ordinal Knowledge-Based DSSs: methodology and Applications. Decision Sciences. 23:1357-1372.

BibTeX:

     @article{Ben-David1992,
        author = {Arie Ben-David},
        journal = {Decision Sciences},
        pages = {1357-1372},
        title = {Automatic Generation of Symbolic Multiattribute Ordinal Knowledge-Based DSSs: methodology and Applications},
        volume = {23},
        year = {1992}
     }

Valid options are:

     -R <integer>
      The resolution mode. Valid values are:
      0 for conservative resolution, 1 for random resolution, 2 for average, and 3 for no resolution. (default 0).

     -C <integer>
      The classification mode. Valid values are:
      0 for conservative classification, 1 for nearest neighbour classification. (default 0).

     -U <size>
      SSet maximum size of rule base
      (default: -U <number of examples>)

Version:
  $Revision: 5928 $
Author:
  TriDat Tran
See Also:
  Serialized Form

Field Summary
`static int` | `CLASSIFICATION_CONSERVATIVE`
`static int` | `CLASSIFICATION_NEARESTNEIGHBOUR`
`static int` | `RESOLUTION_AVERAGE`
`static int` | `RESOLUTION_CONSERVATIVE`
`static int` | `RESOLUTION_NONE`
`static int` | `RESOLUTION_RANDOM`
`static Tag[]` | `TAGS_CLASSIFICATION`
`static Tag[]` | `TAGS_RESOLUTION`

Constructor Summary
`OLM()`

Method Summary
`void` | `buildClassifier(Instances data)` Generates the classifier.
`java.lang.String` | `classificationModeTipText()` Returns the tip text for this property
`double` | `classifyInstance(Instance inst)` Classifies a given instance.
`Capabilities` | `getCapabilities()` Returns default capabilities of the classifier.
`SelectedTag` | `getClassificationMode()` Gets the classification mode.
`java.lang.String[]` | `getOptions()` Gets the current settings of the Classifier.
`SelectedTag` | `getResolutionMode()` Gets the resolution mode.
`java.lang.String` | `getRevision()` Returns the revision string.
`int` | `getRuleSize()`
`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.
`java.lang.String` | `globalInfo()` Returns a string describing the classifier.
`java.util.Enumeration` | `listOptions()` Returns an enumeration describing the available options Valid options are:
`static void` | `main(java.lang.String[] args)` Main method for testing this class
`java.lang.String` | `resolutionModeTipText()` Returns the tip text for this property
`java.lang.String` | `ruleSizeTipText()` Returns the tip text for this property
`void` | `setClassificationMode(SelectedTag newMethod)` Sets the classification mode.
`void` | `setOptions(java.lang.String[] options)` Parses a given list of options.
`void` | `setResolutionMode(SelectedTag newMethod)` Sets the resolution mode.
`void` | `setRuleSize(int s)`
`java.lang.String` | `toString()` Prints a description of the classifier.

Methods inherited from class weka.classifiers.AbstractClassifier
`debugTipText, distributionForInstance, forName, getDebug, makeCopies, makeCopy, setDebug`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### RESOLUTION_NONE

    public static final int RESOLUTION_NONE

See Also:
  Constant Field Values

### RESOLUTION_AVERAGE

    public static final int RESOLUTION_AVERAGE

See Also:
  Constant Field Values

### RESOLUTION_RANDOM

    public static final int RESOLUTION_RANDOM

See Also:
  Constant Field Values

### RESOLUTION_CONSERVATIVE

    public static final int RESOLUTION_CONSERVATIVE

See Also:
  Constant Field Values

### TAGS_RESOLUTION

    public static final Tag[] TAGS_RESOLUTION

### CLASSIFICATION_CONSERVATIVE

    public static final int CLASSIFICATION_CONSERVATIVE

See Also:
  Constant Field Values

### CLASSIFICATION_NEARESTNEIGHBOUR

    public static final int CLASSIFICATION_NEARESTNEIGHBOUR

See Also:
  Constant Field Values

### TAGS_CLASSIFICATION

    public static final Tag[] TAGS_CLASSIFICATION

Constructor Detail

### OLM

    public OLM()

Method Detail

### getCapabilities

    public Capabilities getCapabilities()

  Returns default capabilities of the classifier.

  Specified by:
    `getCapabilities` in interface `Classifier`
  Specified by:
    `getCapabilities` in interface `CapabilitiesHandler`
  Overrides:
    `getCapabilities` in class `AbstractClassifier`
  Returns:
    the capabilities of this classifier
  See Also:
    `Capabilities`

### globalInfo

    public java.lang.String globalInfo()

  Returns a string describing the 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.

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

### listOptions

    public java.util.Enumeration listOptions()

  Returns an enumeration describing the available options Valid options are:

  Specified by:
    `listOptions` in interface `OptionHandler`
  Overrides:
    `listOptions` in class `AbstractClassifier`
  Returns:
    an enumeration of all the available options

### setOptions

    public void setOptions(java.lang.String[] options)
                    throws java.lang.Exception

  Parses a given list of options. Valid options are:

       -R <integer>
        The resolution mode. Valid values are:
        0 for conservative resolution, 1 for random resolution, 2 for average, and 3 for no resolution. (default 0).

       -C <integer>
        The classification mode. Valid values are:
        0 for conservative classification, 1 for nearest neighbour classification. (default 0).

       -U <size>
        SSet maximum size of rule base
        (default: -U <number of examples>)

  Specified by:
    `setOptions` in interface `OptionHandler`
  Overrides:
    `setOptions` in class `AbstractClassifier`
  Parameters:
    `options` - the list of options as an array of strings
  Throws:
    `java.lang.Exception` - if an option is not supported

### getOptions

    public java.lang.String[] getOptions()

  Gets the current settings of the Classifier.

  Specified by:
    `getOptions` in interface `OptionHandler`
  Overrides:
    `getOptions` in class `AbstractClassifier`
  Returns:
    an array of strings suitable for passing to setOptions

### resolutionModeTipText

    public java.lang.String resolutionModeTipText()

  Returns the tip text for this property

  Returns:
    tip text for this property suitable for displaying in the explorer/experimenter gui

### setResolutionMode

    public void setResolutionMode(SelectedTag newMethod)

  Sets the resolution mode.

  Parameters:
    `newMethod` - the new evaluation mode.

### getResolutionMode

    public SelectedTag getResolutionMode()

  Gets the resolution mode.

  Returns:
    the evaluation mode.

### setClassificationMode

    public void setClassificationMode(SelectedTag newMethod)

  Sets the classification mode.

  Parameters:
    `newMethod` - the new classification mode.

### getClassificationMode

    public SelectedTag getClassificationMode()

  Gets the classification mode.

  Returns:
    the classiciation mode

### classificationModeTipText

    public java.lang.String classificationModeTipText()

  Returns the tip text for this property

  Returns:
    tip text for this property suitable for displaying in the explorer/experimenter gui

### ruleSizeTipText

    public java.lang.String ruleSizeTipText()

  Returns the tip text for this property

  Returns:
    tip text for this property suitable for displaying in the explorer/experimenter gui

### getRuleSize

    public int getRuleSize()

### setRuleSize

    public void setRuleSize(int s)

### buildClassifier

    public void buildClassifier(Instances data)
                         throws java.lang.Exception

  Generates the classifier.

  Specified by:
    `buildClassifier` in interface `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

### getRevision

    public java.lang.String getRevision()

  Returns the revision string.

  Specified by:
    `getRevision` in interface `RevisionHandler`
  Overrides:
    `getRevision` in class `AbstractClassifier`
  Returns:
    the revision

### main

    public static void main(java.lang.String[] args)

  Main method for testing this class

Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD