section-engineering-education / engineering-education

“Section's Engineering Education (EngEd) Program is dedicated to offering a unique quality community experience for computer science university students."
Apache License 2.0
363 stars 889 forks source link

[Machine Learning] Getting Started with Time Series Decomposition in python #5534

Closed sumbaelvis closed 2 years ago

sumbaelvis commented 2 years ago

NOTE: All 1st-time contributors should know Topic approval and PR submission does NOT guarantee your Topic/Article will be published. Our team of Peer Reviewers and Content Moderators will review all PRs that come in to make sure they adhere to the standard of quality we expect from the EngEd community.

We expect all community memebers to go through provided examples, resources, and previously published material before submitting content. As a rule of thumb, please only submit articles (pull requests) that are complete, formatted correctly, and include a fully polished article (ready to be published and error free).

All revisions and edits should be completed on your own forked repo (as to not take up room in the queue). Any PR that is submitted incomplete (meaning not ready to be published as is) will be closed. A PR being closed does NOT mean the article can not be published (or fixed) it simply means that the edits, revisions, and fixes will happen outside of the queue.

Topic Suggestion

Enter topic suggestion here...

Pre-submission advice

By following all our pre-submission advice and reviewing our Resources folder, you will maximise your chances of your topic being approved.

We ask that you please be patient as our team works through approving and publishing all articles/tutorials in a timely manner.

Allow 1-3 days for a topic to be reviewed and/or approved - allow 3-7 days for an articles to be reviewed and/or published (subject to vary depending on volume and/or backlog of articles).

Be sure to visit our Resources Page for tools, resources, and example articles that will help you propose and write a successful article.

Please ensure that you have only one open issue + linked pull request at a time. This will ensure that we complete the article in a timely manner from inception to publishing.)

We tend to stray away or tend not to publish reviews/comparisons of commercial product offerings.

Writing sample(s):

Include any links or writing samples - to help our team better gauge your writing quality.

Proposal Submission

Getting Started with Time Series Decomposition in python

Proposed article introduction

Introduction

Time Series Decomposition is one of the foundational topics of time series modeling. It involves deconstructing a time series into its different components: seasonality, trend, and the leftover residual. We do this because the model performs much better when we remove the already known source of variation. Since the trend and seasonality are deterministic, they can be decomposed from the time series such that we remain the indeterministic component that is not possible to determine(residual). From this, we can now learn the autocorrelation structure of the time series using this indeterministic structure of residuals.

This article will discuss the decomposition of the time series data into these components and the type of models we use when decomposing this data(Additive, Multiplicative, and Pseudo-additive Models).

Before decomposing our time series, we shall first have to discuss in detail what these components are:

  1. Trend: This is the general long-term direction of the time series, which can either be increasing, decreasing, or constant.

  2. Seasonality: The periodic behavior of the time series that occurs within a period of less than one year.

  3. Residual: The irregular fluctuations that can't be predicted using the trend or the seasonality.

Learning outcomes of this article

What will we accomplish;

  1. First, we'll separately construct each time series component.
  2. Then, we'll bring the three components together to create a simulated time series dataset.
  3. Finally, we'll leverage time series model decomposition in python to deconstruct the series.

We'll complete this process for the two most common methods: additive and multiplicative models used in time series.

The whole point of this article will be to get the learner familiar with time-series data and simple modeling approaches.

Key takeaways

An attentive learner should walk away with:

  1. A practical understanding of the three components of time series data
  2. A better understanding of additive and multiplicative models
  3. A simple way to decompose time series data in python

Article quality

Time series is a complicated topic that, if not well covered it can pose a great challenge to the learner. With the keen observation of other topics on the time series decomposition, I have noticed that many authors take advantage of libraries when it comes to implementing. As a result, the learner can't relate what they theoretically learn and what they implement. This article will teach how to decompose time series from scratch using pure programming skills in python and later leverage the existing models for implementation.

Also, many topics on the time series decomposition use datasets that need to pass through a series of time series data preprocessing. Although data preprocessing is an essential activity, it should not be included in topics meant to get learners started. An absolute learner needs to be provided with only the content that is direct to the point. To not load learners with 'insignificant' content, this article will generate a dataset that is ready to use. So, to start with, we shall generate data for each component and combine them to form a time series that later we shall decompose buck to its initial components. This article will engage the learners' attention to a higher degree.

References

N/A

Conclusion

Finally, remove the Pre-Submission advice section and all our blockquoted notes as you fill in the form before you submit. We look forwarding to reviewing your topic suggestion.

Templates to use as guides

ahmadmardeni1 commented 2 years ago

Sounds like a helpful topic - let's please be sure it adds value beyond what is in any official docs and/or what is covered in other blog sites. (the articles should go beyond a basic explanation - and it is always best to reference any EngEd article and build upon it). @sumbaelvis

Please be attentive to grammar/readability and make sure that you put your article through a thorough editing review prior to submitting it for final approval. (There are some great free tools that we reference in EngEd resources.) ANY ARTICLE SUBMITTED WITH GLARING ERRORS WILL BE IMMEDIATELY CLOSED.

Please be sure to double-check that it does not overlap with any existing EngEd articles, articles on other blog sites, or any incoming EngEd topic suggestions (if you haven't already) to avoid any potential article closure, please reference any relevant EngEd articles in yours. - Approved