Making Predictions with Logistic Regression in PyTorch

Logistic regression is a statistical technique for modeling the probability of an event. It is often used in machine learning for making predictions. We apply logistic regression when a categorical outcome needs to be predicted.

In PyTorch, the construction of logistic regression is similar to that of linear regression. They both applied to linear inputs. But logistic regression is specifically classification problems, such as classifying into one of the two outcomes (0 or 1).

In this tutorial, we’ll focus on making predictions with logistic regression. We’ll learn how some of the useful packages in the PyTorch library can help easily create a logistic regression model. Particularly, we’ll learn: