Class AbstractChangeDetector

    • 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
    • Constructor Detail

      • AbstractChangeDetector

        public AbstractChangeDetector()
    • 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 interface ChangeDetector
      • 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 interface ChangeDetector
        Parameters:
        inputValue - the number to insert into the change detector
      • getChange

        public boolean getChange()
        Gets whether there is change detected.
        Specified by:
        getChange in interface ChangeDetector
        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 interface ChangeDetector
        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 interface ChangeDetector
        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 interface ChangeDetector
        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 interface ChangeDetector
        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 interface ChangeDetector
        Specified by:
        getDescription in interface MOAObject
        Parameters:
        sb - the stringbuilder to add the description
        indent - the number of characters to indent