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.2 Bi-Variate Natural Logarithmic Regression<br />

Bi-variate natural logarithmic regression is an approach to modeling the relationship between a scalar variable<br />

y and one variable denoted X. In natural logarithmic regression, data is modeled using natural logarithmic<br />

functions, and unknown model parameters are estimated from the data. Such models are called natural<br />

logarithmic models.<br />

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

y = β1ln(x) + β0<br />

Where β0 and β1 are parameters that need to be calculated.<br />

Let x’ = ln(x)<br />

Then y = β0 + β1 × x’<br />

Thus, y and x’ is a linear relationship and can be solved with 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 X, there are more than 2 records available for analysis.<br />

LNREGRESSION<br />

This is a logarithmic regression function.<br />

Procedure Generation<br />

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

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

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

Table 184:<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 249

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

Saved successfully!

Ooh no, something went wrong!