EWMA 是对一组时序数据进行加权平均,但与普通滑动平均不同,其新数据的权重更高,历史数据权重以指数形式递减。这种方式使得 EWMA 对新的趋势较为敏感,对噪声抑制效果也佳,是一种高效的时间序列平滑技术。
- 不适合长周期剧变判断,更适合抑制高频小波动、捕捉短期趋势。
对于一组数据
初始值 S0 通常可设为第一条数据 x1 或数据的均值
序列展开
def ewma(data, alpha): S = data[0] # 初始值 result = [S] for x in data[1:]: S = alpha * x + (1 - alpha) * S result.append(S) return result
Colloid-SOSP'24
"We apply Exponentially Weighted Moving Averaging (EWMA) on the both the occupancy and rate measurements to smooth noise in the signals."
Memstrata-OSDI'24
"To reduce the effect of short-term variations, we employ an exponentially weighted moving average (EWMA) to smooth the performance metrics derived from the event counts (EWMA constant α = 0.2, by default)."