2 A naive prediction of the future

 

This chapter covers

  • Defining a baseline model
  • Setting a baseline using the mean
  • Building a baseline using the mean of the previous window of time
  • Creating a baseline using the previous timestep
  • Implementing the naive seasonal forecast

In chapter 1 we covered what time series are and how forecasting a time series is different from a traditional regression task. You also learned the necessary steps in building a successful forecasting project, from defining a goal to building a model, deploying it, and updating it as new data is collected. Now you are ready to start forecasting a time series.

You will first learn how to make a naive prediction of the future, which will serve as a baseline. The baseline model is a trivial solution that uses heuristics, or simple statistics, to compute a forecast. Developing a baseline model is not always an exact science. It will often require some intuition that we’ll gain by visualizing the data and detecting patterns that can be used to make predictions. In any modeling project, it is important to have a baseline, as you can use it to compare the performance of the more complex models you’ll build down the road. The only way to know that a model is good, or performant, is to compare it to a baseline.

2.1 Defining a baseline model

 
 
 

2.2 Forecasting the historical mean

 
 
 

2.2.1 Setup for baseline implementations

 
 

2.2.2 Implementing the historical mean baseline

 
 
 
 

2.3 Forecasting last year’s mean

 
 

2.4 Predicting using the last known value

 
 
 

2.5 Implementing the naive seasonal forecast

 
 
 
 

2.6 Next steps

 
 

Summary

 
 
 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest