FunctionRacerProblemsRace

Typical Squared Miss

Beginnerscikit-learnPython

truth holds real values and guess what a model predicted. Return the mean squared error: the average of the squared differences.

Example 1

truth [3,5,7]
guess [2,5,9]
returns 1.6666666666666667

The misses are 1, 0 and 2. Their squares, 1, 0 and 4, average to 1.67.

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More scikit-learn problems