Professional Documents
Culture Documents
excessive buffers. Better information about future traffic, combined with accurate site
capacity measurements, enables confident decision making. Since even a small
percentage of savings translates to a large reduction in total cost, accurate forecasts
have a big business impact. Forecasts enable continued, sustainable growth through
right-sized applications.
Algorithm design
The blue rectangles represent computation steps of the algorithm, decomposed into
two phases:
In (1), a model is utilized to predict the metric of interest, and in (2), a volatility model
is fit to the residuals. This choice helps us with flexibility and speed, because
integrated models are often more susceptible to poor tractability (convergence issues
for parameter estimates) or divergence issues in the simulated future values
(predictions).
(1.a) Extract raw features from timestamps, events data, and history of the series
(e.g., hour, day of week);
(1.b) Transform the features to appropriate basis functions (e.g., Fourier series
terms for various time scales);
(1.d) Apply an appropriate machine learning algorithm to fit the features from
(1.b) and (1.c) (depending on the objective).
3 of 14 8/7/21, 12:56 AM
Greykite: A flexible, intuitive, and fast forecasting library | LinkedIn Eng... https://engineering.linkedin.com/blog/2021/greykite--a-flexible--intuitive...
The purpose of Step (1.b) is to transform the features into a space which can be used
in “additive” models when interpretability is needed. For Step (1.d), we recommend
explicit regularization-based models such as Ridge or Lasso. Note that if the objective
is to predict peaks, quantile regression or its regularized versions are desirable
choices. In the next sections, we provide more details on how these features are built
to capture various properties of the series.
In Phase (2), a simple conditional variance model can be fitted to the residuals, which
allows for the volatility to be a function of specified factors, e.g., day of the week.
Case studies
To make the benefits of this design concrete, we illustrate with a few examples from
public datasets.
For example, Figure 2 shows the number of shared bike rides in Washington, D.C.,
from 2011 to 2019 at an hourly frequency. By inspecting this figure and other
aggregated trend plots, you can observe some indications of changes in trend
patterns. Silverkite allows the user to specify the changepoint locations or request
automatic trend changepoint and seasonality changepoint detection.
4 of 14 8/7/21, 12:56 AM
Greykite: A flexible, intuitive, and fast forecasting library | LinkedIn Eng... https://engineering.linkedin.com/blog/2021/greykite--a-flexible--intuitive...
seasonality
The reason for choosing Adaptive Lasso over Lasso (Tibshirani 1996) is that, in our
experience, the latter over-shrinks significant changepoints’ coefficients to reach the
desired sparsity level.
Finally, the detected changepoints are used to construct piecewise growth basis
functions. For example, instead of a single linear trend, the growth can be piecewise
linear by allowing the slope to change at the detected points. Mathematically, if the
original growth term is f(t), e.g., f(t)=t, after detecting change points t1, …, tK, the
growth function will be of the form
To allow for changes in seasonality, Silverkite constructs basis functions that allow the
seasonal effect to change in both shape and magnitude with time. Silverkite also
allows for automatically detecting seasonality changepoints with the following
regression model:
Repeated events/holidays
It is important to capture the effect of repeated events such as holidays. Silverkite
constructs indicator variables to use as basis functions for the holidays. These
variables take the value 1 during the event, and 0 otherwise.
5 of 14 8/7/21, 12:56 AM