"newp" function in Matlab -



"newp" function in Matlab -

in illustration have found function

net = newp([-2 2;-2 +2],1);

i have looked @ help newp , says:

net = newp(p,t,tf,lf) takes these inputs, p - rxq matrix of q1 representative input vectors. t - sxq matrix of q2 representative target vectors. tf - transfer function, default = 'hardlim'. lf - learning function, default = 'learnp'.

does mean perceptron has 2 inputs , expects 1 output? first send -2 , -2, expect receive 1 , sends 2, 2 , expects 1?

your perceptron has 1 input has 2 elements. each input element has range [-2 2] since specified same rows [-2 2] matrix p. there 1 output. sec argument number of neurons.

you utilize defining input , target vectors. perceptron input 2xn element matrix n number inputs each input having 2 elements. output n element vector.

example,

p = [0 0 1 1; 0 1 0 1]; t = [0 0 0 1]; net = newp([-2 2;-2 +2],1); net = train(net,p,t); y = net(p)

matlab

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -