Constructor
new Ewma(halfLife)
Computes an exponentionally-weighted moving average.
Parameters:
Name | Type | Description |
---|---|---|
halfLife |
number | About half of the estimated value will be from the last |halfLife| samples by weight. |
- Source:
Members
(private) alpha_ :number
Larger values of alpha expire historical data more slowly.
Type:
- number
- Source:
Methods
sample(weight, value)
Takes a sample.
Parameters:
Name | Type | Description |
---|---|---|
weight |
number | |
value |
number |
- Source: