ML0048 Logistic Regression

Can you explain logistic regression and how it contrasts with linear regression?

Answer

Logistic regression maps inputs to a probability space for classification, while linear regression estimates continuous outcomes through a direct linear relationship.

Logistic regression model estimates the probability that a binary outcome (y = 1) occurs, given an input vector (x)
\Pr(y=1 \mid \mathbf{x}) = \frac{1}{1 + e^{-(\mathbf{w}^{\top}\mathbf{x} + b)}}
Where:
\mathbf{x} is the input feature vector,
\mathbf{w} is the weight vector, and
b is the bias term.

Logistic Regression vs. Linear Regression:
Linear Regression:
Purpose: Predicts a continuous output (e.g., price, height).
Output: Real number (can be negative or >1).
Assumes: Linearity between input features and output.

Logistic Regression:
Purpose: Predicts a probability for classification (e.g., spam or not).
Output: Value between 0 and 1 using sigmoid function.
Interpreted as: Probability of class membership.

Here is a table comparing Logistic Regression with Linear Regression.


Login to view more content

Did you solve the problem?

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *