Logistic regression

As discussed before, logistic regression is used to classify a prediction to one class or another depending on the input dataset. Logistic regression uses the sigmoid function to attain the probability of an event happening.

The sigmoid curve looks like this:

Note that the output is a high probability when the x axis value is greater than 3 and the output is a very low probability when the x axis value is less than 3.

Logistic regression differs from linear regression in the usage of the activation function. While a linear regression equation would be Y = a + b * X, a logistic regression equation would be:

Get Hands-On Machine Learning on Google Cloud Platform now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.