arguments of "newp" command of neural network
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Mudasir Ahmed
am 7 Jun. 2015
Kommentiert: Walter Roberson
am 7 Jun. 2015
hi
i hope all are fit and fine. i want to ask a question related the command of neural network "newp". i want to train the weights and bias of 3 input AND gate. but i feel little bit difficulty in initialization of newp command. means how we select first argument of newp and also suggest me how to write it according to the problem. kindly help me in this regard.
Regards, Mudasir
clear
clc
net.IW{1,1}=[0 0 0]
net.b{1}=0
p=[0 1 0 1 0 1 0 1;0 0 1 1 0 0 1 1;0 0 0 0 1 1 1 1]
net=newp([1 8;1 3],1)
t=[0 0 0 0 0 0 0 1]
net.trainParam.epochs=5
net=train(net,p,t)
net.IW{1,1}
net.b{1}
a=sim(net,p)
error=[a(1)-t(1) a(2)-t(2) a(3)-t(3) a(4)-t(4) a(5)-t(5) a(6)-t(6) a(7)-t(7) a(8)-t(8)]
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 7 Jun. 2015
newp() was replaced as of r2010b which is why you cannot find it documented. Use the replacement. http://www.mathworks.com/help/releases/R2012a/toolbox/nnet/ref/perceptron.html
2 Kommentare
Walter Roberson
am 7 Jun. 2015
It says at the top it was obsoleted. There is no point in trying to figure out how it works.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Define Shallow Neural Network Architectures finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!