Logistic regression

We can use the linear regression model to perform binary classification by finding a decision boundary that divides two predicted classes. A common way to do this is by using a sigmoid function, defined as the following:

The plot of the sigmoid function looks like this:

The sigmoid function can be used in the hypothesis function, to output a probability, as follows:

Here, the output of the hypothesis function is the probability ...

Get Deep Learning with PyTorch Quick Start Guide 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.