public final class EWMA
extends java.lang.Object
implements scala.Product, scala.Serializable
http://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average
An EWMA only needs the most recent forecast value to be kept, as opposed to a standard moving average model.
param: alpha decay factor, sets how quickly the exponential weighting decays for past data compared to new data, see http://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average
param: value the current exponentially weighted moving average, e.g. Y(n - 1), or, the sampled value resulting from the previous smoothing iteration. This value is always used as the previous EWMA to calculate the new EWMA.
Constructor and Description |
---|
EWMA(double value,
double alpha) |
Modifier and Type | Method and Description |
---|---|
double |
alpha() |
double |
value() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait