Class SimpleExponentialSmoothing

java.lang.Object
org.apache.hadoop.mapreduce.v2.app.speculate.forecast.SimpleExponentialSmoothing

public class SimpleExponentialSmoothing extends Object
Implementation of the static model for Simple exponential smoothing.
  • Method Details

    • createForecast

      public static SimpleExponentialSmoothing createForecast(long timeConstant, int skipCnt, long stagnatedWindow, long timeStamp)
    • isDataStagnated

      public boolean isDataStagnated(long timeStamp)
      checks if the task is hanging up.
      Parameters:
      timeStamp - current time of the scan.
      Returns:
      true if we have number of samples > kMinimumReads and the record timestamp has expired.
    • incorporateReading

      public void incorporateReading(long timeStamp, double currRawData)
    • getForecast

      public double getForecast()
    • isDefaultForecast

      public boolean isDefaultForecast(double value)
    • getSSE

      public double getSSE()
    • isErrorWithinBound

      public boolean isErrorWithinBound(double bound)
    • getRawData

      public double getRawData()
    • getTimeStamp

      public long getTimeStamp()
    • getStartTime

      public long getStartTime()
    • getForecastRefEntry

      public AtomicReference<org.apache.hadoop.mapreduce.v2.app.speculate.forecast.SimpleExponentialSmoothing.ForecastRecord> getForecastRefEntry()
    • toString

      public String toString()
      Overrides:
      toString in class Object