O'Reilly logo
live online training icon Live Online training

Time series forecasting

Build and deploy your machine learning models to forecast the future

Francesca Lazzeri

Time series data is an invaluable source of information used for future strategy and planning operations everywhere from finance to education and healthcare. In the past few decades, machine learning model-based forecasting has also become very popular in the private and the public decision-making process.

In this hands-on three-hour course, Francesca Lazzeri walks you through the core steps for building, training, and deploying your time series forecasting models. You'll build a theoretical foundation as you cover the essential aspects of time series representations, modeling, and forecasting before diving into the classical methods for forecasting time series data. Francesca guides you through using some of the more common methods, including simple exponential smoothing, autoregressive integrated moving average (ARIMA), and neural networks for time series forecasting. You'll then gain hands-on experience applying these models to a real-world scenario, using machine learning components available in open source Python packages, such as scikit-learn, Keras, and TensorFlow. With these guidelines in mind, you'll be better equipped to deal with time series in your everyday work.

What you'll learn-and how you can apply it

By the end of this live online course, you’ll understand:

  • What makes time series special
  • Loading and handling time series in pandas
  • How to check stationarity of a time series
  • How to make a time series stationary
  • The basics of recurrent neural networks (RNN) and advanced RNN architectures, including LSTM and GRU

And you’ll be able to:

  • Use classical methods for time series forecasting
  • Determine when to use RNNs instead of traditional time series models
  • Employ techniques and tricks for building successful machine learning-based time series forecasting models

This training course is for you because...

  • You're a business analyst or a data scientist who needs to build time series forecasting models.
  • You're a developer who needs to operationalize your time series forecasting models.


  • Experience coding in Python
  • A basic understanding of machine learning and deep learning topics and terminology as well as the mathematics used for machine learning
  • A laptop with an up-to-date version of the Edge or Chrome browser and the Azure Machine Learning Python SDK installed
  • A GitHub account
  • An Azure Notebooks account

Recommended follow-up:

About your instructor

  • Francesca Lazzeri, PhD is AI & Machine Learning Scientist at Microsoft in the Cloud Developer Advocacy team. Francesca is passionate about innovations in big data technologies and the applications of machine learning-based solutions to real-world problems. Her work on these issues covers a wide range of industries including energy, oil and gas, retail, aerospace, healthcare, and professional services.

    Before joining Microsoft, she was Research Fellow in Business Economics at Harvard Business School, where she performed statistical and econometric analysis within the Technology and Operations Management Unit. At Harvard Business School, she worked on multiple patent data-driven projects to investigate and measure the impact of external knowledge networks on companies’ competitiveness and innovation.

    Francesca holds a PhD in Economics & Management from Sant’Anna School of Advanced Studies and is currently Data Science Mentor for PhD and Postdoc students at the Massachusetts Institute of Technology. She enjoys speaking at academic and industry conferences to share her knowledge and passion for AI, machine learning, and coding.


The timeframes are only estimates and may vary according to how the class is progressing

Introduction to time series forecasting (25 minutes)

  • Lecture: What makes time series special?; loading and handling time series in pandas; how to check stationarity of a time series; how to make a time series stationary
  • Q&A

Classical methods for time series forecasting (25 minutes)

  • Lecture: Exponential smoothing (ETS); autoregression (AR); moving average (MA); autoregressive moving average (ARMA); autoregressive integrated moving average (ARIMA)
  • Q&A
  • Break (10 minutes)

Introduction to recurrent neural networks (RNN) for time series forecasting (55 minutes)

  • Lecture: Basic concepts (neurons, layers, weights, bias, and activation functions); cost function; training using stochastic gradient descent and minibatches; backpropagation; early stopping; introduction to recurrent neural networks (RNNs); backpropagation through time (BPTT); vanishing gradient and exploding gradient; comparison of different RNN units—GRU, LSTM
  • Q&A
  • Break (10 minutes)

Build and deploy your own time series forecasting model (55 minutes)

  • Walkthroughs and demonstrations: Simple time series forecasting models with an energy demand forecasting use case; RNN forecasting models with web traffic forecasting and grocery sales forecasting
  • Hands-on exercises: In groups, apply these algorithms to real-world scenarios, using machine learning components available in open source Python packages, such as scikit-learn, Keras, and TensorFlow
  • Group discussion: Comparison of results and performance
  • Wrap-up and Q&A

Bonus exercise: Using your own time series dataset or an available public dataset, such as Rossmann Store Sales or Recruit Restaurant Visitors, build and deploy your own time series model using the Azure Machine Learning service