5 a] Explain the fundamental differences between linear regression and logistic regression.
the fundamental differences between Linear Regression and Logistic Regression:
Aspect | Linear Regression | Logistic Regression |
---|---|---|
Type of Problem | Regression (predicts continuous values) | Classification (predicts categorical outcomes) |
Output | Continuous value (e.g., real numbers) | Probability (0 to 1) |
Assumptions | Linear relationship, homoscedasticity, normality of residuals | Log-odds of the outcome are linearly related to input variables |
Use Cases | Continuous outcomes (e.g., predicting prices, sales) | Categorical outcomes (e.g., spam detection, binary classification) |
Interpretation of Coefficients | Coefficients represent the change in (y) for a unit change in (x) | Coefficients represent the change in log-odds for a unit change in (x) |
Algorithm Goal | Minimize the error between predicted and actual values | Maximize the likelihood of predicting the correct class |
Assumed Distribution | Residuals are normally distributed | The output follows a binomial distribution (binary) |