# MLP network Design

No replies to this topic

### #1Hello

New Member

• Members
• 1 posts

Posted 13 January 2005 - 05:56 PM

Question:
Design a network that classify 5 classes.
class 5: a square that centre is (0,0) and width is 12.

However, when I train the network use the following code, I cannot get good result. The Matlab tell me that network error did not reach the error goal.Further training may be necessary. I do not konw the reason. Then I increase the number of hidden node, but I got the same result.
Please give me some advice. The following part is my Matlab code.
for i=1:500
training(1,i)=12*(rand(1)-0.5);
training(2,i)=12*(rand(1)-0.5);
end;
for i=1:size(training,2)
if ((training(1,i)-2)^2+(training(2,i)-2)^2)<1
output(:,i)=[1 0 0 0 0]';
elseif ((training(1,i)-2)^2+(training(2,i)+2)^2)<1
output(:,i)=[0 1 0 0 0]';
elseif ((training(1,i)+2)^2+(training(2,i)-2)^2)<1
output(:,i)=[0 0 1 0 0]';
elseif ((training(1,i)+2)^2+(training(2,i)+2)^2)<1
output(:,i)=[0 0 0 1 0]';
else
output(:,i)=[0 0 0 0 1]';
end;
[w1,b1,w2,b2]=initff(training,100,'logsig',output,'logsig');
[w1,b1,w2,b2]=trainbpx(w1,b1,'logsig',w2,b2,'logsig',training,output,-1);

Thank you.

#### 1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users