SimpleExponentialSmoothing (Apache Hadoop MapReduce App 3.5.0 API)
Description: declaration: package: org.apache.hadoop.mapreduce.v2.app.speculate.forecast, class: SimpleExponentialSmoothing

Package org.apache.hadoop.mapreduce.v2.app.speculate.forecast

# 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 Summary

  Modifier and Type
  Method
  Description
  `static SimpleExponentialSmoothing`
  `createForecast(long timeConstant, int skipCnt, long stagnatedWindow, long timeStamp)`
  `double`
  `getForecast()`
  `AtomicReference<org.apache.hadoop.mapreduce.v2.app.speculate.forecast.SimpleExponentialSmoothing.ForecastRecord>`
  `getForecastRefEntry()`
  `double`
  `getRawData()`
  `double`
  `getSSE()`
  `long`
  `getStartTime()`
  `long`
  `getTimeStamp()`
  `void`
  `incorporateReading(long timeStamp, double currRawData)`
  `boolean`
  `isDataStagnated(long timeStamp)`
  checks if the task is hanging up.
  `boolean`
  `isDefaultForecast(double value)`
  `boolean`
  `isErrorWithinBound(double bound)`
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## 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`