braindecode.preprocessing.exponential_moving_demean

braindecode.preprocessing.exponential_moving_demean(data, factor_new=0.001, init_block_size=None)

Perform exponential moving demeanining.

Compute the exponental moving mean mt at time t as mt=factornewmean(xt)+(1factornew)mt1.

Deman the data point xt at time t as: xt=(xtmt).

Parameters
data: np.ndarray (n_channels, n_times)
factor_new: float
init_block_size: int

Demean data before to this index with regular demeaning.

Returns
demeaned: np.ndarray (n_channels, n_times)

Demeaned data.