braindecode.preprocessing.exponential_moving_demean#
- braindecode.preprocessing.exponential_moving_demean(data, factor_new=0.001, init_block_size=None)[source]#
Perform exponential moving demeaning.
Compute the exponential moving mean \(m_t\) at time t as a weighted average: \(m_t = \frac{\sum_{i=0}^t (1-\alpha)^i x_{t-i}}{\sum_{i=0}^t (1-\alpha)^i}\) where \(\alpha\) is
factor_new.Demean the data point \(x_t\) at time t as: \(x'_t=(x_t - m_t)\).