Calculating the Root Mean Squared Error {RMSE} of a model

Question

The formula for the RMSE is as follows:

Calculating the Root Mean Squared Error {RMSE} of a model - 1
Given this formula, write a function to calculate the RMSE (root mean squared error) of a model. Your function should take in two lists as inputs: one with actual values, one with predictions.

Examples:

calc_rmse([1,3], [1,3]) = 0
calc_rmse([1,3,2], [1,3,3]) = 0.5773502691896257

Solution

Access restricted

Subscribe to premium account to see the solution.

Get premium now