Resampling in Temporal Data
Resampling involves changing the frequency of the time values in a dataset. If data observed over time has been collected over different frequencies, for example, over weeks or months, resampling can be used to normalize datasets for a given frequency. During predictive modeling, resampling is widely used to perform feature engineering.
There are two types of resampling:
- Upsampling: Changing the time from, for example, minutes to seconds. Upsampling helps us to visualize and analyze data in more detail, and these fine-grained observations are calculated using interpolation.
- Downsampling: Changing the time from, for example, months to years. Downsampling helps to summarize and get a general sense of trends in data.
Common Pitfalls of Upsampling and Downsampling
Upsampling leads to NaN
values. The methods used in interpolation are linear or cubic splines for imputing NaN
values. This might not represent the original data, so the analysis...