Simple linear regression: intuition, error, and learning.
Use this session to make students comfortable with the core idea: a model predicts a continuous number, measures its mistakes, and finds the best-fitting line.
Session roadmap
Linear regression in ML
Motivation, applications, supervised learning, regression problems, slope, intercept, and the line equation.
2Residuals and cost
Actual vs predicted, residuals, why raw errors cancel, RSS, MSE, RMSE, and MAE.
3How the model learns
Ordinary Least Squares, cost minimization, gradient descent, learning rate, epochs, and convergence.
Class outcome
By the end of Session 1, students should be able to explain what the regression line means, why one line is better than another, and how error minimization connects to model training.
End-of-session check
In one sentence, what is linear regression trying to minimize?
Takeaway: linear regression tries to minimize overall prediction error, commonly the sum or mean of squared residuals.