MOA 12.03
Real Time Analytics for Data Streams
|
Class for using a classifier from WEKA. More...
Public Member Functions | |
String | getPurposeString () |
Gets the purpose of this object. | |
void | resetLearningImpl () |
Resets this classifier. | |
void | trainOnInstanceImpl (Instance inst) |
Trains this classifier incrementally using the given instance. | |
void | buildClassifier () |
double[] | getVotesForInstance (Instance inst) |
Predicts the class memberships for a given instance. | |
boolean | isRandomizable () |
Gets whether this classifier needs a random seed. | |
void | getModelDescription (StringBuilder out, int indent) |
Returns a string representation of the model. | |
void | createWekaClassifier (String[] options) throws Exception |
Public Attributes | |
WEKAClassOption | baseLearnerOption |
IntOption | widthOption |
IntOption | widthInitOption |
IntOption | sampleFrequencyOption |
Protected Member Functions | |
Measurement[] | getModelMeasurementsImpl () |
Gets the current measurements of this classifier. | |
Protected Attributes | |
Classifier | classifier |
int | numberInstances |
Instances | instancesBuffer |
boolean | isClassificationEnabled |
boolean | isBufferStoring |
Class for using a classifier from WEKA.
Definition at line 39 of file WEKAClassifier.java.
void moa.classifiers.meta.WEKAClassifier.buildClassifier | ( | ) |
Definition at line 148 of file WEKAClassifier.java.
Referenced by moa.classifiers.meta.WEKAClassifier.trainOnInstanceImpl().
void moa.classifiers.meta.WEKAClassifier.createWekaClassifier | ( | String[] | options | ) | throws Exception |
Definition at line 196 of file WEKAClassifier.java.
Referenced by moa.classifiers.meta.WEKAClassifier.resetLearningImpl().
void moa.classifiers.meta.WEKAClassifier.getModelDescription | ( | StringBuilder | out, |
int | indent | ||
) | [virtual] |
Returns a string representation of the model.
out | the stringbuilder to add the description |
indent | the number of characters to indent |
Implements moa.classifiers.AbstractClassifier.
Definition at line 184 of file WEKAClassifier.java.
Measurement [] moa.classifiers.meta.WEKAClassifier.getModelMeasurementsImpl | ( | ) | [protected, virtual] |
Gets the current measurements of this classifier.
The reason for ...Impl methods: ease programmer burden by not requiring them to remember calls to super in overridden methods. Note that this will produce compiler errors if not overridden.
Implements moa.classifiers.AbstractClassifier.
Definition at line 191 of file WEKAClassifier.java.
String moa.classifiers.meta.WEKAClassifier.getPurposeString | ( | ) |
Gets the purpose of this object.
Reimplemented from moa.classifiers.AbstractClassifier.
Definition at line 45 of file WEKAClassifier.java.
double [] moa.classifiers.meta.WEKAClassifier.getVotesForInstance | ( | Instance | inst | ) |
Predicts the class memberships for a given instance.
If an instance is unclassified, the returned array elements must be all zero.
inst | the instance to be classified |
Implements moa.classifiers.Classifier.
Definition at line 162 of file WEKAClassifier.java.
boolean moa.classifiers.meta.WEKAClassifier.isRandomizable | ( | ) |
Gets whether this classifier needs a random seed.
Examples of methods that needs a random seed are bagging and boosting.
Implements moa.classifiers.Classifier.
Definition at line 179 of file WEKAClassifier.java.
void moa.classifiers.meta.WEKAClassifier.resetLearningImpl | ( | ) | [virtual] |
Resets this classifier.
It must be similar to starting a new classifier from scratch.
The reason for ...Impl methods: ease programmer burden by not requiring them to remember calls to super in overridden methods. Note that this will produce compiler errors if not overridden.
Implements moa.classifiers.AbstractClassifier.
Definition at line 74 of file WEKAClassifier.java.
void moa.classifiers.meta.WEKAClassifier.trainOnInstanceImpl | ( | Instance | inst | ) | [virtual] |
Trains this classifier incrementally using the given instance.
The reason for ...Impl methods: ease programmer burden by not requiring them to remember calls to super in overridden methods. Note that this will produce compiler errors if not overridden.
inst | the instance to be used for training |
Implements moa.classifiers.AbstractClassifier.
Definition at line 89 of file WEKAClassifier.java.
new WEKAClassOption("baseLearner", 'l', "Classifier to train.", weka.classifiers.Classifier.class, "weka.classifiers.bayes.NaiveBayesUpdateable")
Definition at line 49 of file WEKAClassifier.java.
Referenced by moa.classifiers.meta.WEKAClassifier.resetLearningImpl().
Definition at line 63 of file WEKAClassifier.java.
Referenced by moa.classifiers.meta.WEKAClassifier.buildClassifier(), moa.classifiers.meta.WEKAClassifier.createWekaClassifier(), moa.classifiers.meta.WEKAClassifier.getModelDescription(), moa.classifiers.meta.WEKAClassifier.getVotesForInstance(), and moa.classifiers.meta.WEKAClassifier.trainOnInstanceImpl().
Instances moa.classifiers.meta.WEKAClassifier.instancesBuffer [protected] |
Definition at line 67 of file WEKAClassifier.java.
Referenced by moa.classifiers.meta.WEKAClassifier.buildClassifier(), and moa.classifiers.meta.WEKAClassifier.trainOnInstanceImpl().
boolean moa.classifiers.meta.WEKAClassifier.isBufferStoring [protected] |
Definition at line 71 of file WEKAClassifier.java.
Referenced by moa.classifiers.meta.WEKAClassifier.buildClassifier(), moa.classifiers.meta.WEKAClassifier.resetLearningImpl(), and moa.classifiers.meta.WEKAClassifier.trainOnInstanceImpl().
boolean moa.classifiers.meta.WEKAClassifier.isClassificationEnabled [protected] |
Definition at line 69 of file WEKAClassifier.java.
Referenced by moa.classifiers.meta.WEKAClassifier.getVotesForInstance(), moa.classifiers.meta.WEKAClassifier.resetLearningImpl(), and moa.classifiers.meta.WEKAClassifier.trainOnInstanceImpl().
int moa.classifiers.meta.WEKAClassifier.numberInstances [protected] |
Definition at line 65 of file WEKAClassifier.java.
Referenced by moa.classifiers.meta.WEKAClassifier.resetLearningImpl(), and moa.classifiers.meta.WEKAClassifier.trainOnInstanceImpl().
new IntOption("sampleFrequency", 'f', "How many instances between samples of the learning performance.", 0, 0, Integer.MAX_VALUE)
Definition at line 58 of file WEKAClassifier.java.
Referenced by moa.classifiers.meta.WEKAClassifier.trainOnInstanceImpl().
new IntOption("widthInit", 'i', "Size of first Window for training learner.", 1000, 0, Integer.MAX_VALUE)
Definition at line 55 of file WEKAClassifier.java.
Referenced by moa.classifiers.meta.WEKAClassifier.trainOnInstanceImpl().
new IntOption("width", 'w', "Size of Window for training learner.", 0, 0, Integer.MAX_VALUE)
Definition at line 52 of file WEKAClassifier.java.
Referenced by moa.classifiers.meta.WEKAClassifier.trainOnInstanceImpl().