Interview Query

RMS Error

13
Have you seen this question before?

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
Next question: Fair Coin
.....
Python 3.9.6
Loading editor
Use Shift + Enter to run code