Smoothing
Noisy data is difficult to deal with, so we often need to do some smoothing. Besides calculating moving averages, we can use one of the NumPy functions to smooth data.
The hanning()
function is a window function formed by a weighted cosine (see http://en.wikipedia.org/wiki/Hann_function):
In the preceding formula, N
corresponds to the size of the window. We will cover the other window functions in later chapters.