How to test the external points in Neural Network

1 次查看(过去 30 天)
Dear All;
I have built NN model for classification problem but i need to test selected points , i have made the following code to do it but the problem i am facing is that I am getting a consistent results, for example , i select for class 1 , 4 points, class 2 , 3 points .... but when i check the confusion matrix i found different number of points , i do not know if the code below is the right way to do it:
clc; clear; close all; [x1,TXT,RAW]=xlsread('Sh.xlsx','INP'); [t1,TXT2,RAW2]=xlsread('Sh.xlsx','OUT');
x=x1';
t=t1';
size(x) size(t)
net= patternnet (30); % net.divideParam.trainRatio = 70/100; % net.divideParam.valRatio = 15/100; % net.divideParam.testRatio = 15/100; % view(net) net=init(net); [net,tr] = train(net,x,t);
trind=[143 144 264 265 361 362 394 395 431 432 435 436 633 634 664 665 851 852 ]; testX = x(:,trind); testT = t(:,trind);
testY = net(testX); testIndices = vec2ind(testY)
plotconfusion(testT,testY)
  1 个评论
Greg Heath
Greg Heath 2014-12-13
编辑:Greg Heath 2014-12-13
Insufficient info
What are you classifying?
How many classes? ... Are they mutually exclusive?
Input vector dimensionality?
Number of example in each class?
What are external points?...Nontraining data?

请先登录,再进行评论。

回答(0 个)

类别

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