Introduction to Time Series Forecasting with Prophet
- Introduction to Prophet
- Seasonality and Additive/Multiplicative Modes
- Variable Importance / Effects
- Test Mode and Evaluation of the Model
- External Variables (Extra Regressor)
Inc. to democratize Data Science. Prior to Exploratory, Kan was a director of product development at Oracle leading teams for building various Data Science products in areas including Machine Learning, BI, Data Visualization, Mobile Analytics, Big Data, etc. While at Oracle, Kan also provided training and consulting services to help organizations transform with data. @KanAugust Speaker
predict value from date, with past data as training data. • By feeding the model with future dates, it will produce forecasted values for the future dates. Time Series Forecasting
the data • Day with NA is not allowed • Seasonality with multiple periods (Week and Year) is hard to handle • Parameter tuning is hard and requires a forecasting expert level knowledge. Problems with Traditional Time Series Model
models. • Designed for ease of use without expert knowledge on time series forecasting or statistics. • Built by Data Scientists (Sean J. Taylor & co.) at Facebook and open sourced. (https:// facebook.github.io/prophet) Prophet Sean J. Taylor @seanjtaylor
can be represented as sum of the following components. • Overall growth trend • Seasonality - Yearly, Weekly, Daily, etc. • Holiday effects - X’mas, New Year, July 4th, etc. • External Predictors Prophet - Additive Model
with NA. • Can handle multiple seasonality components (e.g. Yearly, Weekly, etc.). • Works well by default. • Can improve it by using easy-to-interpret parameters with business domain knowledge. Beneﬁt of Prophet Approach
between actual value and forecasted value. • RMSE (Root Mean Square Error) : Root of mean of squares of difference between actual value and forecasted value. • MAPE (Mean Absolute Percentage Error) : Mean of absolute differences in percentage of actual value. • MASE (Mean Absolute Scaled Error) : Divide MAE of the forecasting model by MAE of a naive forecasting model (a simple model that always forecasts one previous value). Metrics to Evaluate Forecasting Model
seasonal variability stays the constant. • But, as Sales increases maybe the seasonal variability increases, too. • This model might not be able to keep up with the actual growth of Sales. Can we model the seasonality that also grows as the Sales grows?
Multiplicative Seasonality Mode Grows 20% in February Grows $20,000 in February The growth is constant regardless of the previous value The growth rate is constant, which means it grows bigger when the previous value big.
compared to the actual values. • It is more useful when we want to compare the two without considering the scale of the actual values. • MAPE is smaller for Asia Paciﬁc, which means we have a better model for Asia Paciﬁc than for Africa. 90
the naive prediction model. • Given it’s a ratio, we can use it to compare among the models regardless of the scale of the actual values. • One advantage of MASE over MAPE is that MAPE can be unreliable when the actual values are close to 0 or have positive and negative values together where MASE doesn’t get bothered by such cases. • The MASE suggests that the model is ﬁtting better for Asia Paciﬁc and USCA compared to other regions.
weather and we can forecast the temperature or whether it will rain or not for the next 10 days. Can we use such information built into the forecasting model? Example
build forecasting models. Prophet investigate if the external predictor (Marketing) is useful to build a better model forecast the target variable (Sales) and calculate the coefﬁcient of the predictor variable. External Predictors
Sales / Demand ForecastingɿWe know it won’t exceed a certain limit. • Conversion RateɿIt never exceed 100%. Prophet can take those limits into account. Capacity