25.10.2016 Views

SAP HANA Predictive Analysis Library (PAL)

sap_hana_predictive_analysis_library_pal_en

sap_hana_predictive_analysis_library_pal_en

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3.5.8 Single Exponential Smoothing<br />

Single Exponential Smoothing model is suitable to model the time series without trend and seasonality. In the<br />

model, the smoothed value is the weighted sum of previous smoothed value and previous observed value.<br />

<strong>PAL</strong> provides two simple exponential smoothing algorithms: single exponential smoothing and adaptiveresponse-rate<br />

simple exponential smoothing. The adaptive-response-rate single exponential smoothing<br />

algorithm may have an advantage over single exponential smoothing in that it allows the value of alpha to be<br />

modified.<br />

For single exponential smoothing, let S t be the smoothed value for the t-th time period. Mathematically:<br />

S 1 = x 0<br />

S t = αx t−1 + (1−a)S t−1<br />

Where α∈(0,1) is a user specified parameter. Forecast is made by:<br />

S T+1 = αx T + (1−a)S T<br />

For adaptive-response-rate single exponential smoothing, let S t be the smoothed value for the t-th time period.<br />

Initialize for adaptive-response-rate single exponential smoothing as follows:<br />

S 1 = x 0<br />

α1 = α2 = α3 = δ = 0.2<br />

A 0 = M 0 = 0<br />

Update the parameter of α as follows:<br />

E t = X t − S t<br />

A t = δE t + (1 − δ)A t-1<br />

M t = δ|E t | + (1 − δ)M t-1<br />

The calculation of the smoothed value as follows:<br />

S t+1 = α t x t + (1 − α t )S t<br />

Where α, δ ∈(0,1) is a user specified parameter, and | | denotes absolute values.<br />

It is worth nothing that when t ≥ T+2, the smoothed value S t , that is, the forecast value, is always S T+1 (x t−1 is<br />

not available and S t−1 is used instead).<br />

<strong>PAL</strong> calculates the prediction interval to get the idea of likely variation. Assume that the forecast data is<br />

normally distributed. The mean value is S t and the variance is σ 2 . Let U t be the upper bound of prediction<br />

interval for S t and L t be the lower bound. Then they are calculated as follows:<br />

U t = S t + zσ<br />

L t = S t - zσ<br />

Here z is the one-tailed value of a standard normal distribution. It is derived from the input parameters<br />

PREDICTION_CONFIDENCE_1 and PREDICTION_CONFIDENCE_2.<br />

394 P U B L I C<br />

<strong>SAP</strong> <strong>HANA</strong> <strong>Predictive</strong> <strong>Analysis</strong> <strong>Library</strong> (<strong>PAL</strong>)<br />

<strong>PAL</strong> Functions

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!