public class MOA
extends weka.classifiers.AbstractClassifier
implements weka.classifiers.UpdateableClassifier
-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
Modifier and Type | Field and Description |
---|---|
protected Classifier |
m_ActualClassifier
the actual moa classifier to use for learning.
|
protected ClassOption |
m_Classifier
the moa classifier option (this object is used in the GenericObjectEditor).
|
Constructor and Description |
---|
MOA() |
Modifier and Type | Method and Description |
---|---|
void |
buildClassifier(weka.core.Instances data)
Generates a classifier.
|
String |
classifierTipText()
Returns the tooltip displayed in the GUI.
|
double[] |
distributionForInstance(weka.core.Instance instance)
Predicts the class memberships for a given instance.
|
weka.core.Capabilities |
getCapabilities()
Returns the Capabilities of this classifier.
|
ClassOption |
getClassifier()
Returns the current MOA classifier in use.
|
String[] |
getOptions()
Gets the current settings of the Classifier.
|
String |
getRevision()
Returns the revision string.
|
String |
globalInfo()
Returns a string describing the classifier.
|
Enumeration |
listOptions()
Returns an enumeration describing the available options.
|
static void |
main(String[] args)
Main method for testing this class.
|
void |
setClassifier(ClassOption value)
Sets the MOA classifier to use.
|
void |
setOptions(String[] options)
Parses a given list of options.
|
String |
toString()
Returns a string representation of the model.
|
void |
updateClassifier(weka.core.Instance instance)
Updates a classifier using the given instance.
|
protected Classifier m_ActualClassifier
protected ClassOption m_Classifier
public String globalInfo()
public Enumeration listOptions()
listOptions
in interface weka.core.OptionHandler
listOptions
in class weka.classifiers.AbstractClassifier
public void setOptions(String[] options) throws Exception
-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
setOptions
in interface weka.core.OptionHandler
setOptions
in class weka.classifiers.AbstractClassifier
options
- the list of options as an array of stringsException
- if an option is not supportedpublic String[] getOptions()
getOptions
in interface weka.core.OptionHandler
getOptions
in class weka.classifiers.AbstractClassifier
public void setClassifier(ClassOption value)
value
- the classifier to usepublic ClassOption getClassifier()
public String classifierTipText()
public weka.core.Capabilities getCapabilities()
getCapabilities
in interface weka.classifiers.Classifier
getCapabilities
in interface weka.core.CapabilitiesHandler
getCapabilities
in class weka.classifiers.AbstractClassifier
Capabilities
public void buildClassifier(weka.core.Instances data) throws Exception
buildClassifier
in interface weka.classifiers.Classifier
data
- set of instances serving as training dataException
- if the classifier has not been
generated successfullypublic void updateClassifier(weka.core.Instance instance) throws Exception
updateClassifier
in interface weka.classifiers.UpdateableClassifier
instance
- the instance to includedException
- if instance could not be incorporated
successfullypublic double[] distributionForInstance(weka.core.Instance instance) throws Exception
distributionForInstance
in interface weka.classifiers.Classifier
distributionForInstance
in class weka.classifiers.AbstractClassifier
instance
- the instance to be classifiedException
- if distribution could not be
computed successfullypublic String getRevision()
getRevision
in interface weka.core.RevisionHandler
getRevision
in class weka.classifiers.AbstractClassifier
public String toString()
public static void main(String[] args)
args
- the optionsCopyright © 2014 University of Waikato, Hamilton, NZ. All Rights Reserved.