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.7 Linear Regression with Damped Trend and Seasonal<br />

Adjust<br />

Linear regression with damped trend and seasonal adjust is an approach for forecasting when a time series<br />

presents a trend. In <strong>PAL</strong>, it provides a damped smoothing parameter for smoothing the forecasted values. This<br />

dampening parameter avoids the over-casting due to the “indefinitely” increasing or decreasing trend. In<br />

addition, if the time series presents seasonality, you can deal with it by providing the length of the periods in<br />

order to adjust the forecasting results. On the other hand, it also helps you to detect the seasonality and to<br />

determine the periods.<br />

Note<br />

Occasionally, there is probability that the average, the linear forecast, or the seasonal index is calculated to<br />

be 0, which gives rise to the issue of division by zero in the subsequent calculation. To address this,<br />

therefore, a tiny value, 1.0e-6 for example, is adopted as the divisor instead of 0. In the Result output table,<br />

an indicator named “HandleZero” is given, which represents if the substitution takes place (1) or not (0).<br />

Prerequisites<br />

●<br />

●<br />

No missing or null data in the inputs. The algorithm will issue errors when encountering null values.<br />

The data is numeric, not categorical.<br />

LRWITHSEASONALADJUST<br />

This is the function for linear regression with damped trend and seasonal adjust.<br />

Procedure Generation<br />

CALL SYS.AFLLANG_WRAPPER_PROCEDURE_CREATE (‘AFL<strong>PAL</strong>’, ‘LRWITHSEASONALADJUST’,<br />

‘’, '', );<br />

The signature table should contain the following records:<br />

Table 278:<br />

Position Schema Name Table Type Name Parameter Type<br />

1 IN<br />

2 IN<br />

3 OUT<br />

4 <br />

OUT<br />

388 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!