Logistic regression

Logistic regression is a probabilistic model that is, its predictions are bounded between 0 and 1, and for binary classification, equate to the model's estimate of the probability of the data point belonging to the positive class. Logistic regression is one of the most widely used linear classification models.

As mentioned earlier, the link function used in logistic regression is this logit link:

1 / (1 + exp(- WTx))   a

The related loss function for logistic regression is the logistic loss:

log(1 + exp(-y WTx)) 

Here, y is the actual target variable (either 1 for the positive class or -1 for the negative class).

Get Machine Learning with Spark - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.