weka.classifiers
Class LEM2

java.lang.Object
  |
  +--weka.classifiers.Classifier
        |
        +--weka.classifiers.RuleClassifier
              |
              +--weka.classifiers.LEM2
All Implemented Interfaces:
Cloneable, OptionHandler, Serializable, WeightedInstancesHandler

public class LEM2
extends RuleClassifier
implements OptionHandler, WeightedInstancesHandler

Author:
Ola Leifler (olale@ida.liu.se)
See Also:
Serialized Form

Field Summary
protected  Instances instances
          The dataset header for the purposes of printing out a semi-intelligible model
 
Fields inherited from class weka.classifiers.RuleClassifier
accuracy, reducedSetAccuracy, rules, ruleStrengthOption
 
Constructor Summary
LEM2()
           
 
Method Summary
 void buildClassifier(Instances i)
          Generates the classifier.
 String debugTipText()
           
 int getDebug()
          Handling local variables
 String[] getOptions()
          Gets the current settings of the Classifier.
 Enumeration listOptions()
          -D Debug -S {s|m|r|d|p|c} Rule strength calculation.
static void main(String[] args)
          Main method for testing this class.
 void printInfo()
           
 void setDebug(int v)
           
 void setOptions(String[] options)
          Parses a given list of options.
 String toString()
          Returns a description of the classifier.
 
Methods inherited from class weka.classifiers.RuleClassifier
accuracyTipText, classifyInstance, getAccuracy, getReducedSetAccuracy, getRuleStrengthOption, reducedSetAccuracyTipText, ruleStrengthOptionTipText, setAccuracy, setReducedSetAccuracy, setRuleStrengthOption
 
Methods inherited from class weka.classifiers.Classifier
forName, makeCopies
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

instances

protected Instances instances
The dataset header for the purposes of printing out a semi-intelligible model

Constructor Detail

LEM2

public LEM2()
Method Detail

buildClassifier

public void buildClassifier(Instances i)
                     throws Exception
Generates the classifier. Follows the article of Grymala-Busse '92 almost exactly

Specified by:
buildClassifier in class Classifier
Parameters:
i - set of instances serving as training data
Throws:
Exception - if the classifier has not been generated successfully

getDebug

public int getDebug()
Handling local variables


setDebug

public void setDebug(int v)

debugTipText

public String debugTipText()

listOptions

public Enumeration listOptions()
-D Debug -S {s|m|r|d|p|c} Rule strength calculation. s = Simple Strength m = Maximal Strength d = Stability Strength

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

setOptions

public void setOptions(String[] options)
                throws Exception
Parses a given list of options.

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

getOptions

public String[] getOptions()
Gets the current settings of the Classifier.

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

printInfo

public void printInfo()

toString

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

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

main

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