How to find the Relative Root Mean Square Error for the given data?

조회 수: 275 (최근 30일)
Sadiq Akbar
Sadiq Akbar 2024년 3월 6일
답변: Divyam 2024년 10월 30일 6:07
I have some data as given below:
u=[-30 30 -50 50];% desired vector
low = [-90 -90 -90 -90];
up = [90 90 90 90];
b = low + (up - low) .* randn(1,4);% Estimated vetors
How will we find the Relative Root Mean Sqaure Error (RRMSE) for this? Further, what does the RRMSE show?
  댓글 수: 6
Dyuman Joshi
Dyuman Joshi 2024년 3월 7일
편집: Dyuman Joshi 2024년 3월 7일
@Sadiq Akbar, you should read the comments included in the code above.
Sadiq Akbar
Sadiq Akbar 2024년 3월 8일
Yes, I read and made the dimension of both equal and it worked. But If we want to determine the RMSE and the RRMSE for the above data when u=[-30 30]; Then what is the diffeence between them. Further and most important if we want to draw a plot for both the metrics i.e., RMSE and RRMSE for the above data, then how will be that and what is the difference between both? I mean what extra information is given by RRMSE than RMSE?

댓글을 달려면 로그인하십시오.

답변 (1개)

Divyam
Divyam 2024년 10월 30일 6:07
To compare by drawing a plot for RMSE and RRMSE, you can simply use a barplot and check the values for each using the code below in addition to the code provided by Manikanta:
metrics = [rmse, rrmse];
metric_names = {'RMSE', 'RRMSE'};
figure;
bar(metrics);
set(gca, 'xticklabel', metric_names);
ylabel('Error');
title('Comparison of RMSE and RRMSE');
The key difference between RMSE and RRMSE is that RRMSE normalizes the RMSE value by dividing RMSE by the mean of the observed values. RRMSE is a better measure for comparing error values across different datasets. RRMSE thus makes the error relative to the size of the data and hence removes the influence of scaling on datasets.
Dataset 1:
observed = [100, 120, 150]
predicted = [98, 123, 147]
RMSE = 2.708
RRMSE = 0.021788
Dataset 2:
observed = [1000, 1200, 1500]
predicted = [980, 1230, 1470]
RMSE = 27.0801
RRMSE = 0.021788
Notice how the values for RMSE in the above example vary heavily with the values in the dataset but RRMSE stays constant despite the scaling.

카테고리

Help CenterFile Exchange에서 Tables에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by