Overview
An Exponential Moving Average gives recent samples more weight while retaining a fading memory of older samples.
Smooths a sequence by blending each new value with the previous smoothed value.
Compact metadata for implementation and discovery.
An Exponential Moving Average gives recent samples more weight while retaining a fading memory of older samples.
Quick facts
Runtime and memory behavior at a glance.
Best
O(1)
Average
O(n)
Worst
O(n)
Space
O(1)
ema_next = alpha * sample + (1 - alpha) * ema_previousBlends the latest sample with the previous smoothed value.
Show a noisy line and a smoother line that follows it with some lag.
Smaller alpha values smooth more but react more slowly.
What each reference supports for this entry.
Signal-processing reference for digital filters, convolution, spectral analysis, windows, resampling, and transform-based methods.
Open sourceGood next jumps from the relationship graph, ranked for useful discovery.
EMA replaces a fixed window with exponentially decaying weights.