Time Series Analysis Using ARIMA From Statsmodels
ARIMA and exponential Moving averages are two methods for forecasting based on time series data. In this notebook, I will talk about ARIMA which is an acronym for Autoregressive Integrated Moving Averages.
Autoregressive Integrated Moving Averages (ARIMA)The general process for ARIMA models is the following:
- Visualize the Time Series Data
- Make the time series data stationary
- Plot the Correlation and AutoCorrelation Charts
- Construct the ARIMA Model or Seasonal ARIMA based on the data
- Use the model to make predictions
Let's go through these steps!
Monthly Champagne Sales Data
In [1]:
import numpy as np import pandas as pd import matplotlib.pyplot as plt %matplotlib inline
For this example, I took the sales data which is available on kaggle https://ift.tt/3sDiIi5
In [2]:
df=pd.read_csv('perrin-freres-monthly-champagne-.csv')
In [3]:
df.head()
Out[3]:
Month | Perrin Freres monthly champagne sales millions ?64-?72 |
---|
from Planet SciPy
read more
No comments:
Post a Comment