You are given the following dataset:
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
Then, the normalized root mean square error is given by
where .
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]