Class HDDM_W_Test
- java.lang.Object
-
- moa.AbstractMOAObject
-
- moa.options.AbstractOptionHandler
-
- moa.classifiers.core.driftdetection.AbstractChangeDetector
-
- moa.classifiers.core.driftdetection.HDDM_W_Test
-
- All Implemented Interfaces:
Configurable
,Serializable
,ChangeDetector
,MOAObject
,OptionHandler
public class HDDM_W_Test extends AbstractChangeDetector
Online drift detection method based on McDiarmid's bounds. HDDMW-test uses the EWMA statistic as estimator. It receives as input a stream of real values and returns the estimated status of the stream: STABLE, WARNING or DRIFT.
I. Frias-Blanco, J. del Campo-Avila, G. Ramos-Jimenez, R. Morales-Bueno, A. Ortiz-Diaz, and Y. Caballero-Mota, Online and non-parametric drift detection methods based on Hoeffding's bound, IEEE Transactions on Knowledge and Data Engineering, 2014. DOI 10.1109/TKDE.2014.2345382.
Parameters:
- -d : Confidence to the drift
- -w : Confidence to the warning
- -m : Controls how much weight is given to more recent data compared to older data. Smaller values mean less weight given to recent data
- -t : Option to monitor error increments and decrements (two-sided) or only increments (one-sided)
- Author:
- Isvani Frias-Blanco (ifriasb@udg.co.cu)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HDDM_W_Test.SampleInfo
-
Field Summary
Fields Modifier and Type Field Description protected double
decrCutPoint
protected double
driftConfidence
FloatOption
driftConfidenceOption
protected double
incrCutPoint
protected double
lambda
FloatOption
lambdaOption
protected boolean
oneSidedTest
MultiChoiceOption
oneSidedTestOption
protected static long
serialVersionUID
protected double
warningConfidence
FloatOption
warningConfidenceOption
protected int
width
-
Fields inherited from class moa.classifiers.core.driftdetection.AbstractChangeDetector
delay, estimation, isChangeDetected, isInitialized, isWarningZone
-
Fields inherited from class moa.options.AbstractOptionHandler
config
-
-
Constructor Summary
Constructors Constructor Description HDDM_W_Test()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
detectMeanIncrement(HDDM_W_Test.SampleInfo sample1, HDDM_W_Test.SampleInfo sample2, double confidence)
void
getDescription(StringBuilder sb, int indent)
Returns a string representation of the model.void
input(boolean prediction)
void
input(double value)
Adding a numeric value to the change detector
The output of the change detector is modified after the insertion of a new item inside.protected boolean
monitorMeanDecr(double valor, double confidence)
protected boolean
monitorMeanIncr(double valor, double confidence)
protected void
prepareForUseImpl(TaskMonitor monitor, ObjectRepository repository)
This method describes the implementation of how to prepare this object for use.void
resetLearning()
Resets this change detector.-
Methods inherited from class moa.classifiers.core.driftdetection.AbstractChangeDetector
copy, getChange, getDelay, getEstimation, getOutput, getWarningZone
-
Methods inherited from class moa.options.AbstractOptionHandler
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.MOAObject
measureByteSize
-
Methods inherited from interface moa.options.OptionHandler
getCLICreationString, getOptions, getPurposeString, prepareForUse, prepareForUse
-
-
-
-
Field Detail
-
serialVersionUID
protected static final long serialVersionUID
- See Also:
- Constant Field Values
-
driftConfidenceOption
public FloatOption driftConfidenceOption
-
warningConfidenceOption
public FloatOption warningConfidenceOption
-
lambdaOption
public FloatOption lambdaOption
-
oneSidedTestOption
public MultiChoiceOption oneSidedTestOption
-
incrCutPoint
protected double incrCutPoint
-
decrCutPoint
protected double decrCutPoint
-
lambda
protected double lambda
-
warningConfidence
protected double warningConfidence
-
driftConfidence
protected double driftConfidence
-
oneSidedTest
protected boolean oneSidedTest
-
width
protected int width
-
-
Method Detail
-
resetLearning
public void resetLearning()
Description copied from class:AbstractChangeDetector
Resets this change detector. It must be similar to starting a new change detector from scratch.- Specified by:
resetLearning
in interfaceChangeDetector
- Overrides:
resetLearning
in classAbstractChangeDetector
-
input
public void input(boolean prediction)
-
input
public void input(double value)
Description copied from class:AbstractChangeDetector
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
- Specified by:
input
in classAbstractChangeDetector
- Parameters:
value
- the number to insert into the change detector
-
detectMeanIncrement
public boolean detectMeanIncrement(HDDM_W_Test.SampleInfo sample1, HDDM_W_Test.SampleInfo sample2, double confidence)
-
monitorMeanIncr
protected boolean monitorMeanIncr(double valor, double confidence)
-
monitorMeanDecr
protected boolean monitorMeanDecr(double valor, double confidence)
-
prepareForUseImpl
protected 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
-
getDescription
public void getDescription(StringBuilder sb, int indent)
Description copied from class:AbstractChangeDetector
Returns a string representation of the model.- Specified by:
getDescription
in interfaceChangeDetector
- Specified by:
getDescription
in interfaceMOAObject
- Specified by:
getDescription
in classAbstractChangeDetector
- Parameters:
sb
- the stringbuilder to add the descriptionindent
- the number of characters to indent
-
-