Path: news.mathworks.com!not-for-mail
From: "Kishore " <kishore3385@yahoo.co.in>
Newsgroups: comp.soft-sys.matlab
Subject: Pattern Classification using Neural Network ( newff)
Date: Tue, 3 Nov 2009 01:45:19 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 42
Message-ID: <hco1vf$ndj$1@fred.mathworks.com>
Reply-To: "Kishore " <kishore3385@yahoo.co.in>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1257212719 23987 172.30.248.38 (3 Nov 2009 01:45:19 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 3 Nov 2009 01:45:19 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1623297
Xref: news.mathworks.com comp.soft-sys.matlab:581943


Hello,

I am trying to classify a 4 class problem (each class has  20 features ) using neural network.
So, in order to reduce the complexity, i used newff function to get the weights.

The  problem is i am not very familiar with newff function usage ( the samples are not classified properly- same sample set is being classified welll using k nearest neighbour and bayesian techniques).

It would be great if i can get feed back on the usage of  this newff sequence.

%%%%%%%%

net = newff(training_data',group',no_hiddenLayer); 
% Create a new feed forward network. 20 neurons in the hidden layer.
%training data is a matrix of training samles.
%group is a matrix, where each row is for example [1 0 0 0] or [0 1 0 0] or [0 0 1 %0] or [0 0 0 1] based on the class to which the  training sample belongs.
%so basically i have 4 outputs.




% training parameters -i took this from an example
net.trainParam.goal = 0.1;
net.trainParam.show = 20;
net.trainParam.epochs = 40;
net.trainParam.mc = 0.95;

[net,tr] = train(net,training_data',group');

W = net.IW{1};
V = net.LW{2};

W =W';
V = V';

the best weights are obtained.

Now i do the testing...and classify based on the 4 outputs( which ever is maximum).

Is this approach correct =or am i missing something?


Thanks