Class SimpleExponentialSmoothing
java.lang.Object
org.apache.hadoop.mapreduce.v2.app.speculate.forecast.SimpleExponentialSmoothing
Implementation of the static model for Simple exponential smoothing.
-
Method Summary
Modifier and TypeMethodDescriptionstatic SimpleExponentialSmoothingcreateForecast(long timeConstant, int skipCnt, long stagnatedWindow, long timeStamp) doubleAtomicReference<org.apache.hadoop.mapreduce.v2.app.speculate.forecast.SimpleExponentialSmoothing.ForecastRecord>doubledoublegetSSE()longlongvoidincorporateReading(long timeStamp, double currRawData) booleanisDataStagnated(long timeStamp) checks if the task is hanging up.booleanisDefaultForecast(double value) booleanisErrorWithinBound(double bound) toString()
-
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
-