mighty.utils.signal.exponential_moving_average

mighty.utils.signal.exponential_moving_average(tensor, window: int)[source]

Exponential moving average in a sliding window.

Parameters:
tensor(N,) torch.Tensor

Input tensor.

windowint

Sliding window width.

Returns:
out(N,) torch.Tensor

Filtered array of the same length.