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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>PAL</strong>_KNN_RESULTS_TBL:<br />

3.2.8 Logistic Regression (with Elastic Net Regularization)<br />

Logistic regression models the relationship between a dichotomous dependent variable (also known as<br />

explained variable) and one or more continuous or categorical independent variables (also known as<br />

explanatory variables). It models the log odds of the dependent variable as a linear combination of the<br />

independent variables.<br />

This function can only handle binary-class classification problems. For multiple-class classification problems,<br />

refer to Multi-Class Logistic Regression.<br />

Considering a training data set with n samples and m explanatory variables, the logistic regression model is<br />

made by:<br />

h (θ0 ,θ)(x) = 1/(1 + exp(–(θ 0 +θ T x)))<br />

Where θ 0 is the intercept, θ represents coefficients θ 1 , …, θ m and θ T x = θ 1 x 1 + … + θ m x m<br />

Assuming that there are only two class labels, {0,1}, you can get the below formula:<br />

P(y = 1 | x; (θ 0 ,θ)) = h (θ0 ,θ)(x)<br />

P(y = 0 | x; (θ 0 ,θ)) = 1 – h (θ0 ,θ)(x)<br />

And combine them into:<br />

P(y | x;(θ 0 ,θ)) = h (θ0 ,θ)(x) y (1 – h (θ0 ,θ)(x)) 1-y<br />

Here θ 0 , θ 1 , …, θ m can be obtained through the Maximum Likelihood Estimation (MLE) method.<br />

The likelihood function is:<br />

The log-likelihood function is:<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 165

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

Saved successfully!

Ooh no, something went wrong!