Investigating Seasonality in a Time Series: A Mystery in Three Parts

Excellent piece (part one of three) about time series analysis by my colleague Carly Stambaugh

Data for Breakfast

Recently, I was asked to determine the extent to which seasonality influenced a particular time series. No problem, right? The statsmodels Python package has a seasonal_decompose function that seemed pretty handy; and there’s always Google! As it turns out, this was a bit trickier than I expected. In this post I’ll share some of the problems I encountered while working on this project and how I solved them.

In attempting to find posts or papers that  addressed quantifying the extent to which the time series was driven by seasonality, every example I came across fell into one of two categories:

  • Here’s a few lines of code that produce a visualization of a time series decomposition.
  • Here’s how you can remove the seasonality component of a time series, thus stabilizing your time series before building a predictive model.

Also, each example started with “Here’s a time series with a seasonal trend.”…

View original post 1,099 more words

Published
Categorized as blog

By Boris Gorelik

Machine learning, data science and visualization http://gorelik.net.

Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: