MOA 12.03
Real Time Analytics for Data Streams
weka.classifiers.meta.MOA Class Reference

Wrapper for MOA classifiers. More...

Inheritance diagram for weka.classifiers.meta.MOA:
Collaboration diagram for weka.classifiers.meta.MOA:

List of all members.

Public Member Functions

String globalInfo ()
 Returns a string describing the classifier.
Enumeration listOptions ()
 Returns an enumeration describing the available options.
void setOptions (String[] options) throws Exception
 Parses a given list of options.
String[] getOptions ()
 Gets the current settings of the Classifier.
void setClassifier (ClassOption value)
 Sets the MOA classifier to use.
ClassOption getClassifier ()
 Returns the current MOA classifier in use.
String classifierTipText ()
 Returns the tooltip displayed in the GUI.
Capabilities getCapabilities ()
 Returns the Capabilities of this classifier.
void buildClassifier (Instances data) throws Exception
 Generates a classifier.
void updateClassifier (Instance instance) throws Exception
 Updates a classifier using the given instance.
double[] distributionForInstance (Instance instance) throws Exception
 Predicts the class memberships for a given instance.
String getRevision ()
 Returns the revision string.
String toString ()
 Returns a string representation of the model.

Static Public Member Functions

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

Protected Attributes

Classifier m_ActualClassifier = new DecisionStump()
 the actual moa classifier to use for learning.
ClassOption m_Classifier
 the moa classifier option (this object is used in the GenericObjectEditor).

Detailed Description

Wrapper for MOA classifiers.



Since MOA doesn't offer a mechanism to query a classifier for the types of attributes and classes it can handle, the capabilities of this wrapper are hard-coded: nominal and numeric attributes and only nominal class attributes are allowed.

Valid options are:

 -B <classname + options>
  The MOA classifier to use.
  (default: moa.classifiers.DecisionStump)
 -D
  If set, classifier is run in debug mode and
  may output additional info to the console
Author:
fracpete (fracpete at waikato dot ac dot nz)
Version:
$Revision$

Definition at line 65 of file classifiers/meta/MOA.java.


Member Function Documentation

void weka.classifiers.meta.MOA.buildClassifier ( Instances  data) throws Exception

Generates a classifier.

Parameters:
dataset of instances serving as training data
Exceptions:
Exceptionif the classifier has not been generated successfully

Definition at line 231 of file classifiers/meta/MOA.java.

Here is the call graph for this function:

String weka.classifiers.meta.MOA.classifierTipText ( )

Returns the tooltip displayed in the GUI.

Returns:
the tooltip

Definition at line 196 of file classifiers/meta/MOA.java.

double [] weka.classifiers.meta.MOA.distributionForInstance ( Instance  instance) throws Exception

Predicts the class memberships for a given instance.

If an instance is unclassified, the returned array elements must be all zero. If the class is numeric, the array must consist of only one element, which contains the predicted value.

Parameters:
instancethe instance to be classified
Returns:
an array containing the estimated membership probabilities of the test instance in each class or the numeric prediction
Exceptions:
Exceptionif distribution could not be computed successfully

Definition at line 267 of file classifiers/meta/MOA.java.

Here is the call graph for this function:

Capabilities weka.classifiers.meta.MOA.getCapabilities ( )

Returns the Capabilities of this classifier.

Maximally permissive capabilities are allowed by default. MOA doesn't specify what

Returns:
the capabilities of this object
See also:
Capabilities

Definition at line 207 of file classifiers/meta/MOA.java.

Referenced by weka.classifiers.meta.MOA.buildClassifier().

Here is the caller graph for this function:

ClassOption weka.classifiers.meta.MOA.getClassifier ( )

Returns the current MOA classifier in use.

Returns:
the classifier in use

Definition at line 187 of file classifiers/meta/MOA.java.

String [] weka.classifiers.meta.MOA.getOptions ( )

Gets the current settings of the Classifier.

Returns:
an array of strings suitable for passing to setOptions

Definition at line 155 of file classifiers/meta/MOA.java.

Here is the call graph for this function:

String weka.classifiers.meta.MOA.getRevision ( )

Returns the revision string.

Returns:
the revision

Definition at line 294 of file classifiers/meta/MOA.java.

String weka.classifiers.meta.MOA.globalInfo ( )

Returns a string describing the classifier.

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

Definition at line 87 of file classifiers/meta/MOA.java.

Enumeration weka.classifiers.meta.MOA.listOptions ( )

Returns an enumeration describing the available options.

Returns:
an enumeration of all the available options.

Definition at line 101 of file classifiers/meta/MOA.java.

Here is the call graph for this function:

static void weka.classifiers.meta.MOA.main ( String[]  args) [static]

Main method for testing this class.

Parameters:
argsthe options

Definition at line 317 of file classifiers/meta/MOA.java.

void weka.classifiers.meta.MOA.setClassifier ( ClassOption  value)

Sets the MOA classifier to use.

Parameters:
valuethe classifier to use

Definition at line 177 of file classifiers/meta/MOA.java.

Referenced by weka.classifiers.meta.MOA.setOptions().

Here is the call graph for this function:

Here is the caller graph for this function:

void weka.classifiers.meta.MOA.setOptions ( String[]  options) throws Exception

Parses a given list of options.

Valid options are:

 -B <classname + options>
  The MOA classifier to use.
  (default: moa.classifiers.trees.DecisionStump)
 -D
  If set, classifier is run in debug mode and
  may output additional info to the console
Parameters:
optionsthe list of options as an array of strings
Exceptions:
Exceptionif an option is not supported

Definition at line 135 of file classifiers/meta/MOA.java.

Here is the call graph for this function:

String weka.classifiers.meta.MOA.toString ( )

Returns a string representation of the model.

Returns:
the string representation

Definition at line 303 of file classifiers/meta/MOA.java.

Here is the call graph for this function:

void weka.classifiers.meta.MOA.updateClassifier ( Instance  instance) throws Exception

Updates a classifier using the given instance.

Parameters:
instancethe instance to included
Exceptions:
Exceptionif instance could not be incorporated successfully

Definition at line 249 of file classifiers/meta/MOA.java.

Referenced by weka.classifiers.meta.MOA.buildClassifier().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Initial value:
 new ClassOption(
                        "classifier", 'B', "The MOA classifier to use from within WEKA.",
                        Classifier.class, m_ActualClassifier.getClass().getName().replace("moa.classifiers.", ""),
                        m_ActualClassifier.getClass().getName())

the moa classifier option (this object is used in the GenericObjectEditor).

Definition at line 76 of file classifiers/meta/MOA.java.

Referenced by weka.classifiers.meta.MOA.getClassifier(), weka.classifiers.meta.MOA.setClassifier(), and weka.classifiers.meta.MOA.setOptions().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations