Logistic regression is a supervised learning algorithm used for binary classification — predicting whether an input belongs to one of two classes. Despite its name, it’s actually a linear model for classification, not regression. It models the probability that a given input belongs to a particular class using the logistic (sigmoid) function.
The model computes a linear combination of the input features and applies the sigmoid function to squash the result into a value between 0 and 1. This value is interpreted as the probability of the positive class. The model is trained by minimizing a log-loss (cross-entropy) function using gradient descent.
Logistic regression is simple, interpretable, and surprisingly powerful. It forms the basis of many more advanced models, including neural networks. In reinforcement learning, logistic regression concepts appear in policy models, where actions are selected based on learned probabilities — often using softmax for multi-class cases. It’s also used in contextual bandits and baseline classifiers for reward modeling.