MOA 12.03
Real Time Analytics for Data Streams
|
Wrapper for MOA classifiers. More...
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). |
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
Definition at line 65 of file classifiers/meta/MOA.java.
void weka.classifiers.meta.MOA.buildClassifier | ( | Instances | data | ) | throws Exception |
Generates a classifier.
data | set of instances serving as training data |
Exception | if the classifier has not been generated successfully |
Definition at line 231 of file classifiers/meta/MOA.java.
String weka.classifiers.meta.MOA.classifierTipText | ( | ) |
Returns the tooltip displayed in the GUI.
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.
instance | the instance to be classified |
Exception | if distribution could not be computed successfully |
Definition at line 267 of file classifiers/meta/MOA.java.
Capabilities weka.classifiers.meta.MOA.getCapabilities | ( | ) |
Returns the Capabilities of this classifier.
Maximally permissive capabilities are allowed by default. MOA doesn't specify what
Definition at line 207 of file classifiers/meta/MOA.java.
Referenced by weka.classifiers.meta.MOA.buildClassifier().
ClassOption weka.classifiers.meta.MOA.getClassifier | ( | ) |
Returns the current MOA 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.
Definition at line 155 of file classifiers/meta/MOA.java.
String weka.classifiers.meta.MOA.getRevision | ( | ) |
Returns the revision string.
Definition at line 294 of file classifiers/meta/MOA.java.
String weka.classifiers.meta.MOA.globalInfo | ( | ) |
Returns a string describing the classifier.
Definition at line 87 of file classifiers/meta/MOA.java.
Enumeration weka.classifiers.meta.MOA.listOptions | ( | ) |
Returns an enumeration describing the available options.
Definition at line 101 of file classifiers/meta/MOA.java.
static void weka.classifiers.meta.MOA.main | ( | String[] | args | ) | [static] |
Main method for testing this class.
args | the 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.
value | the classifier to use |
Definition at line 177 of file classifiers/meta/MOA.java.
Referenced by weka.classifiers.meta.MOA.setOptions().
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
options | the list of options as an array of strings |
Exception | if an option is not supported |
Definition at line 135 of file classifiers/meta/MOA.java.
String weka.classifiers.meta.MOA.toString | ( | ) |
Returns a string representation of the model.
Definition at line 303 of file classifiers/meta/MOA.java.
void weka.classifiers.meta.MOA.updateClassifier | ( | Instance | instance | ) | throws Exception |
Updates a classifier using the given instance.
instance | the instance to included |
Exception | if instance could not be incorporated successfully |
Definition at line 249 of file classifiers/meta/MOA.java.
Referenced by weka.classifiers.meta.MOA.buildClassifier().
Classifier weka.classifiers.meta.MOA.m_ActualClassifier = new DecisionStump() [protected] |
the actual moa classifier to use for learning.
Definition at line 73 of file classifiers/meta/MOA.java.
Referenced by weka.classifiers.meta.MOA.buildClassifier(), weka.classifiers.meta.MOA.distributionForInstance(), weka.classifiers.meta.MOA.getOptions(), weka.classifiers.meta.MOA.setClassifier(), weka.classifiers.meta.MOA.toString(), and weka.classifiers.meta.MOA.updateClassifier().
ClassOption weka.classifiers.meta.MOA.m_Classifier [protected] |
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().