Skip to content
C

Mean Squared Error Loss From Scratch

Easypython

Implement Mean Squared Error (MSE) — the notes' own regression loss function — from scratch, and compute it for a set of predictions against the actual values.

Approach: MSE is the average of the squared difference between each prediction and its corresponding actual value.

Input: Two lines: the predicted values (space-separated), then the actual values (space-separated, same count).

Output: One line: the MSE, rounded to 4 decimal places.

Input (stdin)

Output

Run your code to see output here...