From the course: Python for Time Series Forecasting

Unlock this course with a free trial

Join today to access over 24,800 courses taught by industry experts.

Fit mathematical equation model

Fit mathematical equation model - Python Tutorial

From the course: Python for Time Series Forecasting

Fit mathematical equation model

- [Instructor] Let's first load the dataset and visualize the time series. We'll create a statistical model to forecast what will happen beyond December, 1960. To do so, we fit a model to get the numbers in the mathematical equation. The function is in a stats model library. From there, we will import within the TSA submodule ARIMA.model, the class ARIMA. Let's ask for this class, which parameters it needs. The first one, endogenous variable, which is mandatory because we don't have an equal here. It's the series we want to forecast. In this case, is saved into the variable series, so we pass it to the parenthesis, endog equals to the series, and we execute. We are getting a warning which says, No frequency information was provided." Therefore it's inferred, but we'd like to set it up ourselves in our datasets. Why is this happening? Because in the series, when we look at the index, we have a datetime data type object, but without the frequency. If you would've liked to put the…

Contents