- Learn
- Machine Learning
- Regression
ML-M03
Regression
Predicting numbers: linear regression, how it is solved, gradient descent, curves, regularization and the metrics that judge it.
Regression is the most direct form of machine learning: given some features, predict a number, such as a price, a delivery time or tomorrow's demand. This module starts with the straight line and builds out every idea that the rest of the track reuses: a loss that measures mistakes, two ways to minimise it (exact algebra and gradient descent), how adding curved features leads to overfitting, how regularization keeps a model in check, and how to choose a metric that matches what an error really costs.
You will drag lines and descend loss surfaces by hand before seeing the formulas, and every result is checked with a few lines of NumPy or scikit-learn.
Lessons
- ML-03.01 Linear regression intuition Linear regression fits a straight line, or a flat plane in many dimensions, through data: prediction equals weights times features plus a bias. Beginner 14 min
- ML-03.02 Solving linear regression: normal equation and gradient descent Linear regression can be solved exactly with the normal equation, which computes the best weights with matrix algebra in one step. Intermediate 15 min
- ML-03.03 Gradient descent, the engine of ML Gradient descent minimizes a loss by repeatedly stepping in the direction opposite to the gradient: new weight equals old weight minus learning rate times gradient. Beginner 18 min
- ML-03.04 Polynomial regression and basis functions A linear model can fit curves if you give it non-linear features, such as x squared and x cubed. Intermediate 10 min
- ML-03.05 Regularization: ridge, lasso, elastic net Regularization adds a penalty on weight size to the loss so the model prefers simpler solutions. Intermediate 14 min
- ML-03.06 Regression metrics MAE averages absolute errors and is easy to explain; MSE and RMSE square errors, punishing large mistakes more; MAPE expresses errors as percentages but breaks near zero; R squared measures the share of variance explained. Beginner 10 min