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.3.5 Polynomial Regression<br />

Polynomial regression is an approach to modeling the relationship between a scalar variable y and a variable<br />

denoted X. In polynomial regression, data is modeled using polynomial functions, and unknown model<br />

parameters are estimated from the data. Such models are called polynomial models.<br />

In <strong>PAL</strong>, the implementation of exponential regression is to transform to linear regression and solve it:<br />

y = β 0 + β 1 × x + β 2 × x 2 + … + β n × x n<br />

Where β0…βn are parameters that need to be calculated.<br />

Let x = x1’, x 2 = x2’, …, x n = xn’, and then<br />

y’ = β0’ + β1 × x1 + β2 × x2 + … + βn × xn<br />

So, y’ and x1…xn is a linear relationship and can be solved using the linear regression method.<br />

The implementation also supports calculating the F value and R^2 to determine statistical significance.<br />

Prerequisites<br />

●<br />

●<br />

●<br />

No missing or null data in the inputs.<br />

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

Given the structure as Y and X1...Xn, there are more than n+1 records available for analysis.<br />

POLYNOMIALREGRESSION<br />

This is a polynomial regression function.<br />

Procedure Generation<br />

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

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

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

Table 208:<br />

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

1 IN<br />

2 IN<br />

3 <br />

4 <br />

OUT<br />

OUT<br />

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

<strong>PAL</strong> Functions P U B L I C 277

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

Saved successfully!

Ooh no, something went wrong!