Root Mean Square Error
-
rbelhach95
- Posts: 115
- Joined: Sat Feb 09, 2013 9:30 am
Root Mean Square Error
Dear Tom,
I would lke to compute RMSE, my observed and focasted matrices are of sizes (M,P), I could compute the RMSE column by column, but I would like to do it for the whole database, is this code correct?
Many thanks for your help
Rachid
source "C:\ Desktop\ uforeerrors.src"
do i = 1, M
sample(smpl=%valid(observed)) observed(i) / goodsource1(i)
sample(smpl=%valid(forecasted)) forecasted(i) / goodsource2(i)
@UForeErrors goodsource1(i) goodsource2(i)
end do i
I would lke to compute RMSE, my observed and focasted matrices are of sizes (M,P), I could compute the RMSE column by column, but I would like to do it for the whole database, is this code correct?
Many thanks for your help
Rachid
source "C:\ Desktop\ uforeerrors.src"
do i = 1, M
sample(smpl=%valid(observed)) observed(i) / goodsource1(i)
sample(smpl=%valid(forecasted)) forecasted(i) / goodsource2(i)
@UForeErrors goodsource1(i) goodsource2(i)
end do i
Last edited by rbelhach95 on Mon Dec 01, 2014 2:32 am, edited 4 times in total.
Re: Root Mean Square Error
I'm not sure what you mean. How can the observed be different size than the forecasted for computing RMSE? You can only calculate this over the range that overlaps. As is reads, that looks wrong since the samples of the two don't match up.
-
rbelhach95
- Posts: 115
- Joined: Sat Feb 09, 2013 9:30 am
Re: Root Mean Square Error
Thanks Tom for your inputs. Sorry I wasn't very clear, they are both of the same size MxP. I ran the code but I get error
Thanks
Rachid
Thanks
Rachid
Re: Root Mean Square Error
How can the SMPL options be different? As you've written that, those won't match up. Also @UFOREERRORS will only do one pair. If you want a single RMSE's across all pairs, you'll have to compute that yourself. (It's just the sqrt(sum of squared errors / number of terms)).
-
rbelhach95
- Posts: 115
- Joined: Sat Feb 09, 2013 9:30 am
Re: Root Mean Square Error
I get it, in fact, they don' t match up. Many thanks
Rachid
Rachid