How to interpret Neural Network output if it is NaN?

2 次查看(过去 30 天)
Code to classify output into 3 classes- 0,1 and 2 (indicating no fault, line fault and irradiance fault). Output shows NaN and -0.00
Code:
% code
filename= 'new_3classes_Modif_NEURAL_NET_INPUT.xlsx';
S= xlsread (filename, 'B3:B106');
T= xlsread (filename, 'C3:C106');
V= xlsread (filename, 'D3:D106');
I= xlsread (filename, 'E3:E106');
P= xlsread (filename, 'G3:F106');
O= xlsread (filename, 'H3:G106');
C = [S T V I P];
x= transpose (C);
t = O.';
net = cascadeforwardnet(10);
net = configure(net,x,t);
y1 = net(x);
net = train(net,x,t);
y2 = net(x);
plotconfusion (t,y2);
end

回答(1 个)

Greg Heath
Greg Heath 2017-4-23
For classification into mutually exclusive classes, the target columns should be [0,1] unit vectors. For examples, search the NEWSGROUP and ANSWERS using:
greg patternnet
and
greg patternnet tutorial
Hope this helps.
Thank you for formally accepting my answer
Greg

类别

Help CenterFile Exchange 中查找有关 Pattern Recognition and Classification 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by