Calculating the nRMSE

Report a typo

You are given the following dataset:

xx

yy

y^\hat{y}

0

3.6

4

1

4

4.4

2

4.2

4.8

3

4.5

5.2

4

6.1

5.6

5

5.8

6

6

6

6.4

7

6.3

6.8

Calculate the normalized root mean square error. Suppose the normalizing factor is the average value of the target. Round the answer up to the third decimal place.

As a reminder, the root mean square error is calculated as

RMSE(Y,Y^)=MSE(Y,Y^)=(y1y^1)2+(y2y^2)2++(yny^n)2n\text{RMSE}(Y, \hat{Y}) = \sqrt{\text{MSE}(Y, \hat{Y})} = \sqrt{\frac{(y_1 - \hat{y}_1)^2 + (y_2 - \hat{y}_2)^2 + \dots + (y_n - \hat{y}_n)^2}{n}}

Then, the normalized root mean square error is given by

nRMSE=RMSEyˉ\text{nRMSE} = \frac{\text{RMSE}}{\bar{y}}

where yˉ=1ni=1nyi\bar{y} = \frac{1}{n}\sum \limits_{i = 1}^n y_i.

Task values as Python lists
y = [3.6, 4, 4.2, 4.5, 6.1, 5.8, 6, 6.3]
y_hat = [4, 4.4, 4.8, 5.2, 5.6, 6, 6.4, 6.8]
Enter a number
___

Create a free account to access the full topic