🤖 Machine Learning / AI
Beginner
What is logistic regression?
Answer
Despite its name, logistic regression is a classification algorithm, not regression. It models the probability that an input belongs to a class using the sigmoid function, which squashes the output to a value between 0 and 1. If the predicted probability > 0.5, the class is 1; otherwise 0. It is trained using cross-entropy loss and gradient descent. Logistic regression is fast, interpretable, and works well for linearly separable data. It can be extended to multi-class problems using softmax regression (multinomial logistic regression).