arguments of "newp" command of neural network
6 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
Walter Roberson
2015 年 6 月 7 日
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 件のコメント
Walter Roberson
2015 年 6 月 7 日
It says at the top it was obsoleted. There is no point in trying to figure out how it works.
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!