public class DDM<V> extends BaseDriftDetector<V>
drifting, driftStart, history, maxHistory, time, warning
Constructor and Description |
---|
DDM()
Creates a new DDM drift detector using the default warning and drift
thresholds of 2 and 3 respectively.
|
DDM(DDM<V> toCopy)
Copy constructor
|
DDM(double warningThreshold,
double driftThreshold)
Creates a new DDM drift detector
|
Modifier and Type | Method and Description |
---|---|
boolean |
addSample(boolean trial,
V obj)
Adds a new boolean trial to the detector, with the goal of detecting when
the number of successful trials (
true ) drifts to a new value. |
boolean |
addSample(double value,
V obj)
Adds a new point to the drift detector.
|
DDM<V> |
clone() |
void |
driftHandled()
This method should be called once the drift is handled.
|
double |
getDriftThreshold()
Returns the threshold multiple for controlling the false positive /
negative rate on detecting changes.
|
double |
getSuccessRate()
Returns the current estimate of the success rate (number of
true
inputs) for the model. |
double |
getWarningThreshold()
Returns the threshold multiple for controlling the false positive /
negative rate on detecting changes.
|
void |
setDriftThreshold(double driftThreshold)
Sets the multiplier on the standard deviation that must be exceeded to
recognize the change as a drift.
|
void |
setWarningThreshold(double warningThreshold)
Sets the multiplier on the standard deviation that must be exceeded to
initiate a warning state.
|
addToHistory, clearHistory, getDriftAge, getDriftedHistory, getMaxHistory, isDrifting, isWarning, setMaxHistory
public DDM()
public DDM(double warningThreshold, double driftThreshold)
warningThreshold
- the threshold for starting a warning statedriftThreshold
- the threshold for recognizing a driftpublic double getSuccessRate()
true
inputs) for the model.public boolean addSample(boolean trial, V obj)
true
) drifts to a new value.
This detector begins storing a history of the obj
inputs only
once it has entered a warning state. trial
- the result of the trialobj
- the object to associate with the trialtrue
if we are in a warning or drift state,
false
if we are notpublic void setWarningThreshold(double warningThreshold)
setDriftThreshold(double)
, the drift state will not occur until
the warning state is reached, and the warning state will be skipped.warningThreshold
- the positive multiplier threshold for starting a
warning statepublic double getWarningThreshold()
public void setDriftThreshold(double driftThreshold)
driftThreshold
- the positive multiplier threshold for detecting a
driftpublic double getDriftThreshold()
public boolean addSample(double value, V obj)
BaseDriftDetector
true
will be returned. A change of state could be either drift
occurring BaseDriftDetector.isDrifting()
or a warning state BaseDriftDetector.isWarning()
.
If the detector was in a warning state and then goes back to normal,
false
will be returned. value
will be
considered false
if and only if its value is equal to zero. Any
non zero value will be treated as true
addSample
in class BaseDriftDetector<V>
value
- the numeric value to add to the drift detectorobj
- the object associated with this value. It may or may not be
stored in the detectors historytrue
if a drift has or may be starting.public void driftHandled()
BaseDriftDetector
driftHandled
in class BaseDriftDetector<V>
public DDM<V> clone()
clone
in class BaseDriftDetector<V>
Copyright © 2017. All rights reserved.