𝔖 Scriptorium
✦   LIBER   ✦

πŸ“

Forecasting Time Series Data with Prophet: Build, improve, and optimize time series forecasting models using Meta's advanced forecasting tool, 2nd Edition

✍ Scribed by Greg Rafferty


Publisher
Packt Publishing
Year
2023
Tongue
English
Leaves
282
Edition
2
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


Create and improve fully automated forecasts for time series data with strong seasonal effects, holidays, and additional regressors using Python

Purchase of the print or Kindle book includes a free PDF eBook

Key Features

  • Explore Prophet, the open source forecasting tool developed at Meta, to improve your forecasts
  • Create a forecast and run diagnostics to understand forecast quality
  • Fine-tune models to achieve high performance and report this performance with concrete statistics

Book Description

Prophet empowers Python and R developers to build scalable time series forecasts. This book will help you to implement Prophet's cutting-edge forecasting techniques to model future data with high accuracy using only a few lines of code.

You'll begin by exploring the evolution of time series forecasting, from basic early models to present-day advanced models. After the initial installation and setup, you'll take a deep dive into the mathematics and theory behind Prophet. You'll then cover advanced features such as visualizing your forecasts, adding holidays and trend changepoints, and handling outliers. You'll use the Fourier series to model seasonality, learn how to choose between an additive and multiplicative model, and understand when to modify each model parameter. This updated edition has a new section on modeling shocks such as COVID. Later on in the book you'll see how to optimize more complicated models with hyperparameter tuning and by adding additional regressors to the model. Finally, you'll learn how to run diagnostics to evaluate the performance of your models and discover useful features when running Prophet in production environments.

By the end of this book, you'll be able to take a raw time series dataset and build advanced and accurate forecasting models with concise, understandable, and repeatable code.

What you will learn

  • Understand the mathematics behind Prophet's models
  • Build practical forecasting models from real datasets using Python
  • Understand the different modes of growth that time series often exhibit
  • Discover how to identify and deal with outliers in time series data
  • Find out how to control uncertainty intervals to provide percent confidence in your forecasts
  • Productionalize your Prophet models to scale your work faster and more efficiently

Who this book is for

This book is for business managers, data scientists, data analysts, machine learning engineers, and software engineers who want to build time-series forecasts in Python or R. To get the most out of this book, you should have a basic understanding of time series data and be able to differentiate it from other types of data. Basic knowledge of forecasting techniques is a plus.

Table of Contents

  1. The History and Development of Time Series Forecasting
  2. Getting Started with Prophet
  3. How Prophet Works
  4. Handling Non-Daily Data
  5. Working with Seasonality
  6. Forecasting Holiday Effects
  7. Controlling Growth Modes
  8. Influencing Trend Changepoints
  9. Including Additional Regressors
  10. Accounting for Outliers and Special Events
  11. Managing Uncertainty Intervals
  12. Performing Cross-Validation
  13. Evaluating Performance Metrics
  14. Productionalizing Prophet

✦ Table of Contents


Cover
Title Page
Copyright
Contributors
Table of Contents
Preface
Part 1: Getting Started with Prophet
Chapter 1: The History and Development of Time Series Forecasting
Understanding time series forecasting
The problem with dependent data
Moving averages and exponential smoothing
ARIMA
ARCH/GARCH
Neural networks
Prophet
Recent developments
NeuralProphet
Google’s β€œrobust time series forecasting at scale”
LinkedIn’s Silverkite/Greykite
Uber’s Orbit
Summary
Chapter 2: Getting Started with Prophet
Technical requirements
Installing Prophet
Installation on macOS
Installation on Windows
Installation on Linux
Building a simple model in Prophet
Interpreting the forecast DataFrame
Understanding components plots
Summary
Chapter 3: How Prophet Works
Technical requirements
Facebook’s motivation for building Prophet
Analyst-in-the-loop forecasting
The math behind Prophet
Linear growth
Logistic growth
Seasonality
Holidays
Summary
Part 2: Seasonality, Tuning, and Advanced Features
Chapter 4: Handling Non-Daily Data
Technical requirements
Using monthly data
Using sub-daily data
Using data with regular gaps
Summary
Chapter 5: Working with Seasonality
Technical requirements
Understanding additive versus multiplicative seasonality
Controlling seasonality with the Fourier order
Adding custom seasonalities
Adding conditional seasonalities
Regularizing seasonality
Global seasonality regularization
Local seasonality regularization
Summary
Chapter 6: Forecasting Holiday Effects
Technical requirements
Adding default country holidays
Adding default state/province holidays
Creating custom holidays
Creating multi-day holidays
Regularizing holidays
Global holiday regularization
Individual holiday regularization
Summary
Chapter 7: Controlling Growth Modes
Technical requirements
Applying linear growth
Understanding the logistic function
Saturating forecasts
Increasing logistic growth
Non-constant cap
Decreasing logistic growth
Applying flat growth
Creating a custom trend
Summary
Chapter 8: Influencing Trend Changepoints
Technical requirements
Automatic trend changepoint detection
Default changepoint detection
Regularizing changepoints
Specifying custom changepoint locations
Summary
Chapter 9: Including Additional Regressors
Technical requirements
Adding binary regressors
Adding continuous regressors
Interpreting the regressor coefficients
Summary
Chapter 10: Accounting for Outliers and Special Events
Technical requirements
Correcting outliers that cause seasonality swings
Correcting outliers that cause wide uncertainty intervals
Detecting outliers automatically
Winsorizing
Standard deviation
The moving average
Error standard deviation
Modeling outliers as special events
Modeling shocks such as COVID-19 lockdowns
Summary
Chapter 11: Managing Uncertainty Intervals
Technical requirements
Modeling uncertainty in trends
Modeling uncertainty in seasonality
Summary
Part 3: Diagnostics and Evaluation
Chapter 12: Performing Cross-Validation
Technical requirements
Performing k-fold cross-validation
Performing forward-chaining cross-validation
Creating the Prophet cross-validation DataFrame
Parallelizing cross-validation
Summary
Chapter 13: Evaluating Performance Metrics
Technical requirements
Understanding Prophet’s metrics
Mean squared error
Root mean squared error
Mean absolute error
Mean absolute percent error
Median absolute percent error
Symmetric mean absolute percent error
Coverage
Choosing the best metric
Creating a Prophet performance metrics DataFrame
Handling irregular cut-offs
Tuning hyperparameters with grid search
Summary
Chapter 14: Productionalizing Prophet
Technical requirements
Saving a model
Updating a fitted model
Making interactive plots with Plotly
Plotly forecast plot
Plotly components plot
Plotly single component plot
Plotly seasonality plot
Summary
Index
About Packt
Other Books You May Enjoy


πŸ“œ SIMILAR VOLUMES


Forecasting Time Series Data with Prophe
✍ Greg Rafferty πŸ“‚ Library πŸ› Packt Publishing 🌐 English

<p><span>Create and improve fully automated forecasts for time series data with strong seasonal effects, holidays, and additional regressors using Python</span></p><p><span>Purchase of the print or Kindle book includes a free PDF eBook</span></p><h4><span>Key Features</span></h4><ul><li><span><span>

Forecasting Time Series Data with Facebo
✍ Greg Rafferty πŸ“‚ Library πŸ› Packt Publishing 🌐 English

<p><span>Create and improve high-quality automated forecasts for time series data that have strong seasonal effects, holidays, and additional regressors using Python</span></p><h4><span>Key Features</span></h4><ul><li><span><span>Learn how to use the open-source forecasting tool Facebook Prophet to

Forecasting Time Series Data
with Prophe
✍ Greg Rafferty πŸ“‚ Library πŸ“… 2023 πŸ› Packt Publishing Pvt Ltd 🌐 English

Prophet empowers Python and R developers to build scalable time series forecasts. This book will help you to implement Prophet's cutting-edge forecasting techniques to model future data with high accuracy using only a few lines of code. You'll begin by exploring the evolution of time series forecas

Advanced time series data analysis: fore
✍ Agung, I Gusti Ngurah πŸ“‚ Library πŸ“… 2019 πŸ› John Wiley & Sons 🌐 English

Introduces the latest developments in forecasting in advanced quantitative data analysis This book presents advanced univariate multiple regressions, which can directly be used to forecast their dependent variables, evaluate their in-sample forecast values, and compute forecast values beyond the sam

Advanced Time Series Data Analysis: Fore
✍ I. Gusti Ngurah Agung πŸ“‚ Library πŸ“… 2019 πŸ› Wiley 🌐 English

Introduces the latest developments in forecasting in advanced quantitative data analysis This book presents advanced univariate multiple regressions, which can directly be used to forecast their dependent variables, evaluate their in-sample forecast values, and compute forecast values beyond the