Perceptron Neural Network using matlab

3 views (last 30 days)
hi
i need help ! i need some one to explain how to program Perceptron Neural Network. actually i start searching Perceptron two days ago. and i can't understand how to code it. so if anyone have it's code or anything to help i would be grateful.(i did the nearest neighbor for images classification but it doesn't work as we want so i want to try the Perceptron)
Thank you all wish to find help :(
  1 Comment
Een Qurota Aini
Een Qurota Aini on 18 Feb 2014
Hope this example hepls
clc;
clear;
%input
P = [0 0 1 1; 0 1 0 1];
%target
T = [0 1 1 1];
%Membangun jaringan syaraf tiruan dengan perceptron
net = newp(minmax(P),1);
%mengembalikan nilai bobot sesuai dengan inisialisasi fungsi
net = init(net);
%Set epoh sebanyak 10 kali
net.adaptParam.passes = 10;
%Melakukan adaptasi
[net,Y,E] = adapt(net,P,T);
%Menggambar grafik hasil
plotpv(P,T);
plotpc(net.IW{1,1},net.b{1});
%Mencari mean square error
EmEsE = mse(E);
%Tampilkan hasil
BobotInputAkhir = net.IW{1,1}
BobotBiasAkhir = net.b{1}
MSE = EmEsE

Sign in to comment.

Accepted Answer

Greg Heath
Greg Heath on 9 Mar 2013
If you have the NNTBX, just read the documentation and try a few demos using PATTERNNET and some of the pattern recognition/classification data to be found with the command
help nndatasets
Also, using the GUI might help speed your learning.
Hope this helps.
Thank you for formally accepting my answer
Greg

More Answers (0)

Community Treasure Hunt

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

Start Hunting!