In my skilled life as an information scientist, I’ve encountered time collection a number of occasions. Most of my data comes from my tutorial expertise, particularly my programs in Econometrics (I’ve a level in Economics), the place we studied statistical properties and fashions of time collection.
Among the many fashions I studied was SARIMA, which acknowledges the seasonality of a time collection, nonetheless, we now have by no means studied methods to intercept and acknowledge seasonality patterns.
More often than not I needed to discover seasonal patterns I merely relied on visible inspections of information. This was till I chanced on this YouTube video on Fourier transforms and ultimately discovered what a periodogram is.
On this weblog submit, I’ll clarify and apply easy ideas that can flip into helpful instruments that each DS who’s learning time collection ought to know.
Desk of Contents
1. What’s a Fourier Rework?
2. Fourier Rework in Python
3. Periodogram
Let’s assume I’ve the next dataset (AEP power consumption, CC0 license):
import pandas as pd
import matplotlib.pyplot as pltdf = pd.read_csv("information/AEP_hourly.csv", index_col=0)
df.index = pd.to_datetime(df.index)
df.sort_index(inplace=True)
fig, ax =…