MOA 12.03
Real Time Analytics for Data Streams
moa.classifiers.drift.SingleClassifierDrift Class Reference

Class for handling concept drift datasets with a wrapper on a classifier. More...

Inheritance diagram for moa.classifiers.drift.SingleClassifierDrift:
Collaboration diagram for moa.classifiers.drift.SingleClassifierDrift:

List of all members.

Public Member Functions

String getPurposeString ()
 Gets the purpose of this object.
boolean isWarningDetected ()
boolean isChangeDetected ()
void resetLearningImpl ()
 Resets this classifier.
void trainOnInstanceImpl (Instance inst)
 Trains this classifier incrementally using the given instance.
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.

Public Attributes

ClassOption baseLearnerOption
ClassOption driftDetectionMethodOption

Protected Member Functions

Measurement[] getModelMeasurementsImpl ()
 Gets the current measurements of this classifier.

Protected Attributes

Classifier classifier
Classifier newclassifier
DriftDetectionMethod driftDetectionMethod
boolean newClassifierReset
int ddmLevel
int changeDetected = 0
int warningDetected = 0

Detailed Description

Class for handling concept drift datasets with a wrapper on a classifier.

Valid options are:

-l classname
Specify the full class name of a classifier as the basis for the concept drift classifier.

-d Drift detection method to use

Author:
Manuel Baena ([email protected])
Version:
1.1

Definition at line 47 of file SingleClassifierDrift.java.


Member Function Documentation

void moa.classifiers.drift.SingleClassifierDrift.getModelDescription ( StringBuilder  out,
int  indent 
) [virtual]

Returns a string representation of the model.

Parameters:
outthe stringbuilder to add the description
indentthe number of characters to indent

Implements moa.classifiers.AbstractClassifier.

Definition at line 155 of file SingleClassifierDrift.java.

Here is the call graph for this function:

Measurement [] moa.classifiers.drift.SingleClassifierDrift.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.

Returns:
an array of measurements to be used in evaluation tasks

Implements moa.classifiers.AbstractClassifier.

Definition at line 160 of file SingleClassifierDrift.java.

Here is the call graph for this function:

String moa.classifiers.drift.SingleClassifierDrift.getPurposeString ( )

Gets the purpose of this object.

Returns:
the string with the purpose of this object

Reimplemented from moa.classifiers.AbstractClassifier.

Definition at line 52 of file SingleClassifierDrift.java.

double [] moa.classifiers.drift.SingleClassifierDrift.getVotesForInstance ( Instance  inst)

Predicts the class memberships for a given instance.

If an instance is unclassified, the returned array elements must be all zero.

Parameters:
instthe instance to be classified
Returns:
an array containing the estimated membership probabilities of the test instance in each class

Implements moa.classifiers.Classifier.

Definition at line 145 of file SingleClassifierDrift.java.

Here is the call graph for this function:

boolean moa.classifiers.drift.SingleClassifierDrift.isChangeDetected ( )

Definition at line 77 of file SingleClassifierDrift.java.

boolean moa.classifiers.drift.SingleClassifierDrift.isRandomizable ( )

Gets whether this classifier needs a random seed.

Examples of methods that needs a random seed are bagging and boosting.

Returns:
true if the classifier needs a random seed.

Implements moa.classifiers.Classifier.

Definition at line 150 of file SingleClassifierDrift.java.

boolean moa.classifiers.drift.SingleClassifierDrift.isWarningDetected ( )

Definition at line 73 of file SingleClassifierDrift.java.

void moa.classifiers.drift.SingleClassifierDrift.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 83 of file SingleClassifierDrift.java.

Here is the call graph for this function:

void moa.classifiers.drift.SingleClassifierDrift.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.

Parameters:
instthe instance to be used for training

Implements moa.classifiers.AbstractClassifier.

Definition at line 97 of file SingleClassifierDrift.java.

Here is the call graph for this function:


Member Data Documentation

Initial value:
 new ClassOption("baseLearner", 'l',
            "Classifier to train.", Classifier.class, "bayes.NaiveBayes")

Definition at line 56 of file SingleClassifierDrift.java.

Referenced by moa.classifiers.drift.SingleClassifierDrift.resetLearningImpl(), and moa.classifiers.drift.SingleClassifierDrift.trainOnInstanceImpl().

Initial value:
 new ClassOption("driftDetectionMethod", 'd',
             "Drift detection method to use.", DriftDetectionMethod.class, "DDM")

Definition at line 59 of file SingleClassifierDrift.java.

Referenced by moa.classifiers.drift.SingleClassifierDrift.resetLearningImpl().


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