aNet.ai
Machine Learning/Learning path
0day streak0XP · Lv 1
← Machine Learning learning path
06
Supervised learning

Linear Regression

The first complete model: a linear function fit by least squares, in closed form or by gradient descent.

9 lessons~74 min7 formulas6 questions
0%
Not started yet
Quiz mastery0%
Start
What you’ll take away
  • Linear regression predicts a weighted sum of features plus a bias.
  • Least squares has a closed form (normal equation) and a convex loss for gradient descent.
  • Residual plots reveal non-linearity, outliers and changing variance.
  • RMSE punishes big errors, MAE is robust, R² is the share of variance explained.
Major concepts (syllabus)

Linear models, least squares, closed-form solution, gradient descent, prediction error, Univariate vs. multivariate regression, Overfitting, underfitting, and regularization (Ridge/Lasso intro). Evaluation metrics: RMSE, MAE, R², F1 score

Lessons

  1. Linear modelsPredicting a target as a weighted sum of features plus a bias.8 min
  2. Univariate vs. multivariate regressionOne input feature versus many.8 min
  3. Least squaresChoosing weights that minimise the sum of squared residuals.8 min
  4. The closed-form solutionThe normal equation and when it is practical.10 min
  5. Gradient descent for regressionTraining the same model iteratively when data is large.9 min
  6. Prediction errorResiduals and what their patterns tell you.7 min
  7. Overfitting and regularization in regressionPolynomial features, and Ridge/Lasso to tame them.9 min
  8. Metrics: RMSE, MAE and R²Error in target units, robust error and explained variance.9 min
  9. A first look at the F1 scoreThe classification metric you will meet properly in Model Evaluation.6 min

Key formulas

Linear model

Weighted sum of features plus intercept.

Least squares loss

Sum of squared residuals.

Normal equation

Closed-form least-squares solution.

MSE gradient

Used for gradient-descent training.

RMSE

Error in the target's units; punishes big errors.

MAE

Average absolute error; robust to outliers.

R²

Fraction of variance explained; 1 is perfect.

Key terms

Linear regression
Predicting a continuous target as a weighted sum of features plus a bias.
Normal equation
Closed-form least squares solution w = (XᵀX)⁻¹Xᵀy.
R²
Fraction of the target's variance explained by the model.
Residual
Difference between the true and predicted value.
RMSE
Root mean squared error, in the target's units.
Full glossary →
Practice this topic6 questions · earn XP and build your streak
aNet.ai · Introduction to Machine Learning · NewUU course outlineProgress saved in this browser