how to classify two class using neural network

1 vue (au cours des 30 derniers jours)
tamanna
tamanna le 16 Avr 2013

Réponse acceptée

Greg Heath
Greg Heath le 16 Avr 2013
patternnet
help patternnet
doc patternnet
Hope this helps.
Greg
  3 commentaires
tamanna
tamanna le 30 Avr 2013
sir..this is the coding i got from somewhere for probabilistic neural network. X = [7.02 1;50.13 5;90.1 9;86.08 9;62 4;59.9 15;35.6 20;35.5 60;70.89 48;40.3 80]';
Tc = [1 2 3 4 5 6 7 8 9 10];
plot(X(1,:),X(2,:),'.','markersize',20)
for i=1:10
text(X(1,i)+0.1,X(2,i),sprintf('class %g',Tc(i))),
end
% axis([0 200 0 200])
title('Ten vectors and their classes.')
xlabel('X(1,:)')
ylabel('X(2,:)')
%.......................................
T = ind2vec(Tc);
spread = 1;
net = newpnn(X,Tc,spread); ........................................%
% Y = sim(net,X,Tc);
% Y = net(X);
Y= X';
Yc = vec2ind(Y);
figure;
plot(X(1,:),X(2,:),'.','markersize',30)
% axis([0 200 0 200])
for i=1:10,text(X(1,i)+0.1,X(2,i),sprintf('class %g',Yc(i))),
end
title('Testing the network.')
xlabel('X(1,:)')
ylabel('X(2,:)')
%......................................%
x = [20; 10.5];
y=x';
% y = net(x);
ac = vec2ind(y);
hold on
plot(x(1),x(2),'.','markersize',30,'color',[1 0 0])
text(x(1)+0.1,x(2),sprintf('class %g',ac))
hold off
title('Classifying y new vector.')
xlabel('X(1,:) and x(1)')
ylabel('X(2,:) and x(2)')
may you tell me what the flow of the program
Greg Heath
Greg Heath le 1 Mai 2013
I have a better idea:
1. Run the program
2. Run again with semicolons removed
3. Study the results
4. If you have any questions, repost with comments before every line you understand and a line of question marks before every line you do not understand.
Greg

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Image Data Workflows dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by