Class NodeMetrics.Types.EWMA
The exponentially weighted moving average (EWMA) approach captures short-term movements in volatility for a conditional volatility forecasting model. By virtue of its alpha, or decay factor, this provides a statistical streaming data model that is exponentially biased towards newer entries.
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.
Parameter '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
Parameter '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.
Implements
Inherited Members
Namespace: Akka.Cluster.Metrics.Serialization
Assembly: Akka.Cluster.Metrics.dll
Syntax
public sealed class EWMA : IEquatable<NodeMetrics.Types.EWMA>
Constructors
| Improve this Doc View SourceEWMA(Double, Double)
Creates new instance of NodeMetrics.Types.EWMA
Declaration
public EWMA(double value, double alpha)
Parameters
Type | Name | Description |
---|---|---|
Double | value | The current exponentially weighted moving average, e.g. Y(n - 1), or, the sampled value resulting from the previous smoothing iteration. |
Double | 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 |
Properties
| Improve this Doc View SourceAlpha
Declaration
public double Alpha { get; }
Property Value
Type | Description |
---|---|
Double |
Value
Declaration
public double Value { get; }
Property Value
Type | Description |
---|---|
Double |
Methods
| Improve this Doc View SourceEquals(NodeMetrics.Types.EWMA)
Declaration
public bool Equals(NodeMetrics.Types.EWMA other)
Parameters
Type | Name | Description |
---|---|---|
NodeMetrics.Types.EWMA | other |
Returns
Type | Description |
---|---|
Boolean |
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Overrides
| Improve this Doc View SourceGetAlpha(TimeSpan, TimeSpan)
Calculate the alpha (decay factor) used in [[akka.cluster.EWMA]] from specified half-life and interval between observations. Half-life is the interval over which the weights decrease by a factor of two. The relevance of each data sample is halved for every passing half-life duration, i.e. after 4 times the half-life, a data sample’s relevance is reduced to 6% of its original relevance. The initial relevance of a data sample is given by 1 – 0.5 ^ (collect-interval / half-life).
Declaration
public static double GetAlpha(TimeSpan halfLife, TimeSpan collectInterval)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | halfLife | |
TimeSpan | collectInterval |
Returns
Type | Description |
---|---|
Double |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
Operators
| Improve this Doc View SourceAddition(NodeMetrics.Types.EWMA, Double)
Calculates the exponentially weighted moving average for a given monitored data set.
Declaration
public static NodeMetrics.Types.EWMA operator +(NodeMetrics.Types.EWMA current, double xn)
Parameters
Type | Name | Description |
---|---|---|
NodeMetrics.Types.EWMA | current | Current EWMA value |
Double | xn | The new data point |
Returns
Type | Description |
---|---|
NodeMetrics.Types.EWMA | A new EWMA with the updated value |