LR for churn prediction
LR is one of the most widely used classifiers to predict a binary response. It is a linear ML method, as described in Chapter 1, Analyzing Insurance Severity Claim. The loss
function is the formulation given by the logistic loss:
![](https://static.packt-cdn.com/products/9781788479042/graphics/08733894-55a1-41f9-aec7-4afc9089b2d9.png)
For the LR model, the loss
function is the logistic loss. For a binary classification problem, the algorithm outputs a binary LR model such that, for a given new data point, denoted by x, the model makes predictions by applying the logistic function:
![](https://static.packt-cdn.com/products/9781788479042/graphics/a649da7d-60a1-415f-b374-b2d3e20f8175.png)
In the preceding equation, z = WTX and if f(WTX)>0.5, the outcome is positive; otherwise, it is negative.
Note
Note that the raw output of the LR model, f(z), has a probabilistic interpretation.
Note that compared to linear regression, logistic regression provides you with a higher classification accuracy. Moreover, it is a flexible way to regularize a model for custom adjustment, and overall, the model responses are measures of probability.
Most importantly, whereas linear regression can predict...