Apply data smoothing/filtering to a time series by automatically selecting parameters.
Currently available smoothing/filtering techniques in the package:
- Savitzky–Golay filter
from auto_smooth import auto_savgol
# apply savgol filter
data_filtered = auto_savgol(data)
>>> wl_best=7, po_best=2
Savitzky–Golay (Abraham Savitzky and Marcel J. E. Golay) filter is a type of low-pass filter used for smoothing noisy data.1 It is based on local least-squares fitting.2
auto_savgol
method applies a Savitzky–Golay filter using the scipy savgol_filter()
method.
from auto_smooth import auto_savgol
# apply savgol filter
data_filtered = auto_savgol(data)
# pass window-length and polynomial-order arguments
data_filtered = auto_savgol(data, wl_min=10, wl_max=30, po_min=2, po_max=10)
- Smoothing and Differentiation of Data by Simplified Least Squares Procedures
- Scipy savgol filter
- Savitzky–Golay
- Convolution
- What Is a Savitzky-Golay Filter?