On Mar 14, 12:57 pm, "david " <david.sabine...@gmail.com> wrote:
> Hello all,
> I have a question about how to calculate the root meas square error when we have a time series and we want to predict one step a head by aneuralnetwork:
> for example ;
> let we have y =(1 , 2 , 3 , 4 , 85 , 6 , 7 , 8 , 9 ,10 , 11 , 12 , 13 , 14 , 15 ,16)
> as time series and we divded it into two sets : training set trset=(1,2,......10)
Here you have defined trset as a sequence, not as a length.
and a test set =(11,12,...16). After I have constructed
myneuralnetwork and traind it i want to evaluate the generalisation
error on the test set so I calculated yhat as theneuralnetwork outputs
on the test set. now to calculate the RMSE error :
ptrn = y(1:9);
ttrn = y(2:10);
Ntrn = length(ptrn) % 9
ptst = y(10:15);
ttst = y(11:16);
ytst = sim(net,ptst);
etst = ttstytst;
MSEtst = mse(etst)
RMSEtst = sqrt(MSEtst)
> root mean square error= ((sum((yhaty(1,trset+1:16)).^2))/(16 trset))^.5
> or by this relation :
> root mean square error= ((sum((yhaty(1,trset+1:16)).^2))/(16))^.5
> what is the correct relation ? the first where we divide by (16trset= 1610=6) or the second where we divide by 16 .
>
> Thanks in advance
>
> david
See above.
Hope this helps.
Greg
