Linear Regression

Fit a straight line to data — your first real ML model for predicting numbers.

The model: y = mx + b

m (slope): How much y increases per unit of x.

b (intercept): Predicted y when x = 0.

Residual: Actual − predicted (vertical error). Training minimizes these errors (often squared → MSE).

Interactive Visualizer

MSE: - (lower = better fit)

Pink lines = residuals. Green line = your model.
Student Marks Predictor: Use study hours to predict exam score — classic linear regression in Practice.