Interview Query

RMS Error

Start Timer

0:00:00

Upvote
20
Downvote
Save question
Mark as completed
View comments (22)
Next question

Write a function calculate_rmse to calculate the root mean squared error of a regression model. The function should take in two lists, one that represents the predictions y_pred and another with the target values y_true.

Input:

Example 1: 

y_pred = [3,4,5]
y_true = [3,4,5]

def calculate_rmse(y_pred,y_true) -> 0

Example 2:

y_pred = [3,4,5]
y_true = [5,4,3]

def calculate_rmse(y_pred,y_true) -> 1.63
.
.
.
.
.


Comments

Loading comments