Describe linear regression versus logistic regression.
TechnicalML EngineerMachine Learning EngineerData ScientistAI EngineerLinear regression predicts a continuous output, modeling the relationship between independent and dependent variables using a straight line. It minimizes the sum of squared differences between observed and predicted values. In contrast, logistic regression is used for binary classification, predicting probabilities that map to discrete classes using the logistic function.
While linear regression outputs any real number, logistic regression outputs values between 0 and 1, making it suitable for classification tasks. A key trade-off is that linear regression can be sensitive to outliers, while logistic regression handles them better.