Predicting sales with Prophet
Forecasting a time series can be a challenging task if there are many different methods you can use and many different hyperparameters for each method. The Prophet library is an open source library designed to make predictions for univariate time series data sets. It is easy to use and designed to automatically find a good set of hyperparameters for the model to make competent predictions for data with standard trends and seasonal structure. We will learn how to use the Facebook Prophet package to predict the weekly sales time series:
- First, we will import the library and create a dataset that contains all the features described as either continuous variables or one-hot representations:
from fbprophet import Prophet
data = train.drop(['Year','Month','Week'],axis=1).merge(features.drop(['IsHoliday','Week'],axis=1),on=['Store','Date'])
data = pd.concat([data.drop(['Type&apos...