Package moa.evaluation
Class WindowRegressionPerformanceEvaluator
- java.lang.Object
-
- moa.AbstractMOAObject
-
- moa.options.AbstractOptionHandler
-
- moa.evaluation.WindowRegressionPerformanceEvaluator
-
- All Implemented Interfaces:
Configurable
,Serializable
,CapabilitiesHandler
,LearningPerformanceEvaluator<Example<Instance>>
,RegressionPerformanceEvaluator
,MOAObject
,OptionHandler
public class WindowRegressionPerformanceEvaluator extends AbstractOptionHandler implements RegressionPerformanceEvaluator
Regression evaluator that updates evaluation results using a sliding window.- Version:
- $Revision: 7 $
- Author:
- Albert Bifet (abifet at cs dot waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
WindowRegressionPerformanceEvaluator.Estimator
-
Field Summary
Fields Modifier and Type Field Description protected WindowRegressionPerformanceEvaluator.Estimator
averageError
protected WindowRegressionPerformanceEvaluator.Estimator
averageTargetError
protected double
numAttributes
protected int
numClasses
protected WindowRegressionPerformanceEvaluator.Estimator
squareError
protected WindowRegressionPerformanceEvaluator.Estimator
squareTargetError
protected WindowRegressionPerformanceEvaluator.Estimator
sumTarget
protected double
TotalweightObserved
protected WindowRegressionPerformanceEvaluator.Estimator
weightObserved
IntOption
widthOption
-
Fields inherited from class moa.options.AbstractOptionHandler
config
-
-
Constructor Summary
Constructors Constructor Description WindowRegressionPerformanceEvaluator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addResult(Example<Instance> example, double[] prediction)
Adds a learning result to this evaluator.void
addResult(Example<Instance> testInst, Prediction prediction)
double
getAdjustedCoefficientOfDetermination()
double
getCoefficientOfDetermination()
void
getDescription(StringBuilder sb, int indent)
Returns a string representation of this object.double
getMeanError()
Measurement[]
getPerformanceMeasurements()
Gets the current measurements monitored by this evaluator.double
getSquareError()
double
getTotalWeightObserved()
void
prepareForUseImpl(TaskMonitor monitor, ObjectRepository repository)
This method describes the implementation of how to prepare this object for use.void
reset()
Resets this evaluator.void
reset(int numClasses)
-
Methods inherited from class moa.options.AbstractOptionHandler
copy, getCLICreationString, getOptions, getPreparedClassOption, getPurposeString, prepareClassOptions, prepareForUse, prepareForUse
-
Methods inherited from class moa.AbstractMOAObject
copy, measureByteSize, measureByteSize, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface moa.capabilities.CapabilitiesHandler
getCapabilities
-
Methods inherited from interface moa.evaluation.LearningPerformanceEvaluator
defineImmutableCapabilities
-
Methods inherited from interface moa.MOAObject
measureByteSize
-
-
-
-
Field Detail
-
widthOption
public IntOption widthOption
-
TotalweightObserved
protected double TotalweightObserved
-
weightObserved
protected WindowRegressionPerformanceEvaluator.Estimator weightObserved
-
squareError
protected WindowRegressionPerformanceEvaluator.Estimator squareError
-
squareTargetError
protected WindowRegressionPerformanceEvaluator.Estimator squareTargetError
-
sumTarget
protected WindowRegressionPerformanceEvaluator.Estimator sumTarget
-
numAttributes
protected double numAttributes
-
averageTargetError
protected WindowRegressionPerformanceEvaluator.Estimator averageTargetError
-
averageError
protected WindowRegressionPerformanceEvaluator.Estimator averageError
-
numClasses
protected int numClasses
-
-
Method Detail
-
reset
public void reset()
Description copied from interface:LearningPerformanceEvaluator
Resets this evaluator. It must be similar to starting a new evaluator from scratch.- Specified by:
reset
in interfaceLearningPerformanceEvaluator<Example<Instance>>
-
reset
public void reset(int numClasses)
-
addResult
public void addResult(Example<Instance> example, double[] prediction)
Description copied from interface:LearningPerformanceEvaluator
Adds a learning result to this evaluator.- Specified by:
addResult
in interfaceLearningPerformanceEvaluator<Example<Instance>>
- Parameters:
example
- the example to be classifiedprediction
- an array containing the estimated membership probabilities of the test instance in each class
-
getPerformanceMeasurements
public Measurement[] getPerformanceMeasurements()
Description copied from interface:LearningPerformanceEvaluator
Gets the current measurements monitored by this evaluator.- Specified by:
getPerformanceMeasurements
in interfaceLearningPerformanceEvaluator<Example<Instance>>
- Returns:
- an array of measurements monitored by this evaluator
-
getCoefficientOfDetermination
public double getCoefficientOfDetermination()
-
getAdjustedCoefficientOfDetermination
public double getAdjustedCoefficientOfDetermination()
-
getTotalWeightObserved
public double getTotalWeightObserved()
-
getMeanError
public double getMeanError()
-
getSquareError
public double getSquareError()
-
getDescription
public void getDescription(StringBuilder sb, int indent)
Description copied from interface:MOAObject
Returns a string representation of this object. Used inAbstractMOAObject.toString
to give a string representation of the object.- Specified by:
getDescription
in interfaceMOAObject
- Parameters:
sb
- the stringbuilder to add the descriptionindent
- the number of characters to indent
-
prepareForUseImpl
public void prepareForUseImpl(TaskMonitor monitor, ObjectRepository repository)
Description copied from class:AbstractOptionHandler
This method describes the implementation of how to prepare this object for use. All classes that extends this class have to implementprepareForUseImpl
and notprepareForUse
sinceprepareForUse
callsprepareForUseImpl
.- Specified by:
prepareForUseImpl
in classAbstractOptionHandler
- Parameters:
monitor
- the TaskMonitor to userepository
- the ObjectRepository to use
-
addResult
public void addResult(Example<Instance> testInst, Prediction prediction)
- Specified by:
addResult
in interfaceLearningPerformanceEvaluator<Example<Instance>>
-
-