Class AbstractChangeDetector
- java.lang.Object
-
- moa.AbstractMOAObject
-
- moa.options.AbstractOptionHandler
-
- moa.classifiers.core.driftdetection.AbstractChangeDetector
-
- All Implemented Interfaces:
Configurable
,Serializable
,ChangeDetector
,MOAObject
,OptionHandler
- Direct Known Subclasses:
ADWINChangeDetector
,CusumDM
,DDM
,EDDM
,EnsembleDriftDetectionMethods
,EWMAChartDM
,GeometricMovingAverageDM
,HDDM_A_Test
,HDDM_W_Test
,NoChangeDetection
,PageHinkleyDM
,RDDM
,SEEDChangeDetector
,SeqDrift1ChangeDetector
,SeqDrift2ChangeDetector
,STEPD
public abstract class AbstractChangeDetector extends AbstractOptionHandler implements ChangeDetector
Abstract Change Detector. All change detectors in MOA extend this class.- Version:
- $Revision: 7 $
- Author:
- Albert Bifet (abifet at cs dot waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected double
delay
Delay in detecting changeprotected double
estimation
Prediction for the next value based in previous seen valuesprotected boolean
isChangeDetected
Change was detectedprotected boolean
isInitialized
The change detector has been initialized with the option valuesprotected boolean
isWarningZone
Warning Zone: after a warning and before a change-
Fields inherited from class moa.options.AbstractOptionHandler
config
-
-
Constructor Summary
Constructors Constructor Description AbstractChangeDetector()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ChangeDetector
copy()
Produces a copy of this change detector methodboolean
getChange()
Gets whether there is change detected.double
getDelay()
Gets the length of the delay in the change detected.abstract void
getDescription(StringBuilder sb, int indent)
Returns a string representation of the model.double
getEstimation()
Gets the prediction of next values.double[]
getOutput()
Gets the output state of the change detection.boolean
getWarningZone()
Gets whether the change detector is in the warning zone, after a warning alert and before a change alert.abstract void
input(double inputValue)
Adding a numeric value to the change detector
The output of the change detector is modified after the insertion of a new item inside.void
resetLearning()
Resets this change detector.-
Methods inherited from class moa.options.AbstractOptionHandler
getCLICreationString, getOptions, getPreparedClassOption, getPurposeString, prepareClassOptions, prepareForUse, prepareForUse, prepareForUseImpl
-
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.MOAObject
measureByteSize
-
Methods inherited from interface moa.options.OptionHandler
getCLICreationString, getOptions, getPurposeString, prepareForUse, prepareForUse
-
-
-
-
Field Detail
-
isChangeDetected
protected boolean isChangeDetected
Change was detected
-
isWarningZone
protected boolean isWarningZone
Warning Zone: after a warning and before a change
-
estimation
protected double estimation
Prediction for the next value based in previous seen values
-
delay
protected double delay
Delay in detecting change
-
isInitialized
protected boolean isInitialized
The change detector has been initialized with the option values
-
-
Method Detail
-
resetLearning
public void resetLearning()
Resets this change detector. It must be similar to starting a new change detector from scratch.- Specified by:
resetLearning
in interfaceChangeDetector
-
input
public abstract void input(double inputValue)
Adding a numeric value to the change detector
The output of the change detector is modified after the insertion of a new item inside.- Specified by:
input
in interfaceChangeDetector
- Parameters:
inputValue
- the number to insert into the change detector
-
getChange
public boolean getChange()
Gets whether there is change detected.- Specified by:
getChange
in interfaceChangeDetector
- Returns:
- true if there is change
-
getWarningZone
public boolean getWarningZone()
Gets whether the change detector is in the warning zone, after a warning alert and before a change alert.- Specified by:
getWarningZone
in interfaceChangeDetector
- Returns:
- true if the change detector is in the warning zone
-
getEstimation
public double getEstimation()
Gets the prediction of next values.- Specified by:
getEstimation
in interfaceChangeDetector
- Returns:
- a prediction of the next value
-
getDelay
public double getDelay()
Gets the length of the delay in the change detected.- Specified by:
getDelay
in interfaceChangeDetector
- Returns:
- he length of the delay in the change detected
-
getOutput
public double[] getOutput()
Gets the output state of the change detection.- Specified by:
getOutput
in interfaceChangeDetector
- Returns:
- an array with the number of change detections, number of warnings, delay, and estimation.
-
getDescription
public abstract void getDescription(StringBuilder sb, int indent)
Returns a string representation of the model.- Specified by:
getDescription
in interfaceChangeDetector
- Specified by:
getDescription
in interfaceMOAObject
- Parameters:
sb
- the stringbuilder to add the descriptionindent
- the number of characters to indent
-
copy
public ChangeDetector copy()
Produces a copy of this change detector method- Specified by:
copy
in interfaceChangeDetector
- Specified by:
copy
in interfaceMOAObject
- Specified by:
copy
in interfaceOptionHandler
- Overrides:
copy
in classAbstractOptionHandler
- Returns:
- the copy of this change detector method
-
-