public class SimpleExponentialSmoothing extends Object
| Modifier and Type | Method and Description |
|---|---|
static SimpleExponentialSmoothing |
createForecast(long timeConstant,
int skipCnt,
long stagnatedWindow,
long timeStamp)
Create forecast simple exponential smoothing.
|
double |
getForecast()
Gets forecast.
|
AtomicReference<org.apache.tez.dag.app.dag.speculation.legacy.forecast.SimpleExponentialSmoothing.ForecastRecord> |
getForecastRefEntry()
Gets forecast ref entry.
|
double |
getRawData()
Gets raw data.
|
double |
getSSE()
Gets sse.
|
long |
getStartTime()
Gets start time.
|
long |
getTimeStamp()
Gets time stamp.
|
void |
incorporateReading(long timeStamp,
double currRawData)
Incorporate reading.
|
boolean |
isDataStagnated(long timeStamp)
checks if the task is hanging up.
|
boolean |
isDefaultForecast(double value)
Is default forecast boolean.
|
boolean |
isErrorWithinBound(double bound)
Is error within bound boolean.
|
String |
toString() |
public static SimpleExponentialSmoothing createForecast(long timeConstant, int skipCnt, long stagnatedWindow, long timeStamp)
timeConstant - the time constantskipCnt - the skip cntstagnatedWindow - the stagnated windowtimeStamp - the time stamppublic boolean isDataStagnated(long timeStamp)
timeStamp - current time of the scan.public void incorporateReading(long timeStamp,
double currRawData)
timeStamp - the time stampcurrRawData - the curr raw datapublic double getForecast()
public boolean isDefaultForecast(double value)
value - the valuepublic double getSSE()
public boolean isErrorWithinBound(double bound)
bound - the boundpublic double getRawData()
public long getTimeStamp()
public long getStartTime()
public AtomicReference<org.apache.tez.dag.app.dag.speculation.legacy.forecast.SimpleExponentialSmoothing.ForecastRecord> getForecastRefEntry()
Copyright © 2020 Apache Software Foundation. All rights reserved.