Supervised learning uses labeled data to learn a mapping from inputs to outputs.
Regression: Predicts continuous values. Linear regression: . Loss is mean squared error. Use for price prediction, forecasting.
Classification: Predicts categories. Logistic regression uses sigmoid for probabilities. Loss is cross-entropy. Use for spam detection, diagnosis.
Interview question: "When would you use logistic regression over a neural network?"
Logistic regression when you need interpretability, have limited data, or want a fast baseline. Neural networks when you have abundant data and complex patterns.