Time Series Anomaly Detection Using Prophet in Python

Amy @GrabNGoInfo
GrabNGoInfo
Published in
8 min readJun 6, 2022

--

How to train a time series model, make predictions, and identify outliers using a Prophet model?

Photo by Sebastian Kanczok on Unsplash

This tutorial will talk about how to do time series anomaly detection using Facebook (Meta) Prophet model in Python. Anomalies are also called outliers, and we will use these two terms interchangeably in this tutorial. After the tutorial, you will learn:

  • How to train a time series model using Prophet?
  • How to make predictions using a Prophet model?
  • How to identify outliers using a Prophet time series forecast?

Resources for this post:

Let’s get started!

Step 0: Algorithm for Time Series Anomaly Detection

In step 0, let’s talk about the algorithm for time series anomaly detection. At a high level, the outliers are detected based on the prediction interval of the time series. The implementation includes the following steps:

--

--