Mean Squared Error From Scratch
Difficulty: Easy · Concept: Linear Regression — The Cost Function
MSE is the default regression loss: average the squared difference between each prediction and its true value. It's what Linear Regression minimizes, and it reappears as one term inside more complex losses throughout Deep Learning.
Your task: implement mse(y_true, y_pred) for two equal-length lists of numbers. Raise a ValueError if the lengths don't match, and a ValueError on an empty input (division by zero has no sensible answer here).
Next: Weighted RMSE (a harder variant), or skip ahead to One Gradient Descent Step for Linear Regression