Error in NMSE = MSE/MSE00 matrix dimensions don't match

Hi all
In case the target and input have multiple rows , meaning , more than one input and target , calculating the MSE , I get one single number , and for MSE00 , I have a 3 *1 matrix , since I have 8 inputs and 3 Targets
how to solve it ?

 Accepted Answer

Greg Heath
Greg Heath on 13 Mar 2015
Edited: Greg Heath on 14 Mar 2015
Apparently, you used the wrong equation. Both MSE and MSE00 are scalars.
Search
greg MSE00

9 Comments

Dear Professor
I have used
mean(var(t'),1)
and size(t') = 1055 3 .
that 1055 is the samples. so if this command is wrong , what should I use ?
size(t) = [3 1055]
size(t') = [1055 3]
size(var(t')) = [ 1 3 ]
size(mean(var(t'))) = [ 1 1 ]
OK?
Yes Dear professor
but the above seems to be for MSE00a , not for MSE00 , right ?
I still find contradiction
in this link you have written MSE00 as :
MSE00=mean(var(t1,1)); % MSE00=0.0095
I used these lines and got the results that I have mentioned them besides the parameters, I would like to know if they are reasonable :
Ntrneq = N*O %3165
ynaive = mean(t,2); % 0.02*ones(O,1)
Nw00 = numel(ynaive) % 3
Ndof00 = Ntrneq-Nw00 % 3162
y00 = repmat(ynaive,1,N); % [3 1055]
SSE00 = sse(t-y00) % 1.2023e+04
MSE00 = SSE00/Ntrneq % 3.7988
MSE00a = SSE00/Ndof00 % 3.8024
% MSE00 = mean(var(targets',1)) %
% MSE00a = mean(var(targets',0)) %
% LINEAR MODEL y0 = W0*[ones(1,N); inputs];
W0 = t/[ones(1,N); x];
Nw0 = numel(W0) % 27
Ndof0 = Ntrneq-Nw0 % 3138
y0 = W0*[ones(1,N); x];
SSE0 = sse(t-y0) % 2.9892e+03 isn't this too big ???
MSE0 = SSE0/Ntrneq % 0.9445 biased
MSE0a = SSE0/Ndof0 % 0.9526 DOFa
R20 = 1-MSE0/MSE00 % 0.7514
R20a = 1-MSE0a/MSE00a % 0.7495
the R2a in neural is 0.999 and mostly 1
I just wanted to know if these lines are correct
My data are 8 inputs and 3 outputs , I am wondering why my regression looks like this
I just don't know why the results are accumulated around the end part
It would be really good If I could know my numbers in the code make sense and are in an agreeable range and also if the ROC diagram is correct
could someone help me in evaluation of the posts above ?

Sign in to comment.

More Answers (0)

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Asked:

on 13 Mar 2015

Commented:

on 19 Mar 2015

Community Treasure Hunt

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

Start Hunting!