Acknowledgments viiIntroduction xvChapter 1 Overview of Time Series Forecasting 1Flavors of Machine Learning for Time Series Forecasting 3Supervised Learning for Time Series Forecasting 14Python for Time Series Forecasting 21Experimental Setup for Time Series Forecasting 24Conclusion 26Chapter 2 How to Design an End-to-End Time Series Forecasting Solution on the Cloud 29Time Series Forecasting Template 31Business Understanding and Performance Metrics 33Data Ingestion 36Data Exploration and Understanding 39Data Pre-processing and Feature Engineering 40Modeling Building and Selection 42An Overview of Demand Forecasting Modeling Techniques 44Model Evaluation 46Model Deployment 48Forecasting Solution Acceptance 53Use Case: Demand Forecasting 54Conclusion 58Chapter 3 Time Series Data Preparation 61Python for Time Series Data 62Common Data Preparation Operations for Time Series 65Time stamps vs. Periods 66Converting to Timestamps 69Providing a Format Argument 70Indexing 71Time/Date Components 76Frequency Conversion 78Time Series Exploration and Understanding 79How to Get Started with Time Series Data Analysis 79Data Cleaning of Missing Values in the Time Series 84Time Series Data Normalization and Standardization 86Time Series Feature Engineering 89Date Time Features 90Lag Features and Window Features 92Rolling Window Statistics 95Expanding Window Statistics 97Conclusion 98Chapter 4 Introduction to Autoregressive and Automated Methods for Time Series Forecasting 101Autoregression 102Moving Average 119Autoregressive Moving Average 120Autoregressive Integrated Moving Average 122Automated Machine Learning 129Conclusion 136Chapter 5 Introduction to Neural Networks for Time Series Forecasting 137Reasons to Add Deep Learning to Your Time Series Toolkit 138Deep Learning Neural Networks Are Capable of Automatically Learning and Extracting Features from Raw and Imperfect Data 140Deep Learning Supports Multiple Inputs and Outputs 142Recurrent Neural Networks Are Good at Extracting Patterns from Input Data 143Recurrent Neural Networks for Time Series Forecasting 144Recurrent Neural Networks 145Long Short-Term Memory 147Gated Recurrent Unit 148How to Prepare Time Series Data for LSTMs and GRUs 150How to Develop GRUs and LSTMs for Time Series Forecasting 154Keras 155TensorFlow 156Univariate Models 156Multivariate Models 160Conclusion 164Chapter 6 Model Deployment for Time Series Forecasting 167Experimental Set Up and Introduction to Azure Machine Learning SDK for Python 168Workspace 169Experiment 169Run 169Model 170Compute Target, RunConfiguration, and ScriptRun Config 171Image and Webservice 172Machine Learning Model Deployment 173How to Select the Right Tools to Succeed with Model Deployment 175Solution Architecture for Time Series Forecasting with Deployment Examples 177Train and Deploy an ARIMA Model 179Configure the Workspace 182Create an Experiment 183Create or Attach a Compute Cluster 184Upload the Data to Azure 184Create an Estimator 188Submit the Job to the Remote Cluster 188Register the Model 189Deployment 189Define Your Entry Script and Dependencies 190Automatic Schema Generation 191Conclusion 196References 197Index 199
FRANCESCA LAZZERI is an accomplished economist who works with machine learning, artificial intelligence, and applied econometrics. She works at Microsoft as a data scientist and machine learning scientist to develop a portfolio of machine learning services. She is a sought-after speaker and has given popular talks at AI conferences and academic seminars at Berkeley, Harvard, and MIT.