Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % net = newp([-1 1; -1 1;-1 1], 1);
- % net.IW{1} = [0 1 0];
- % net.b{1} = 0;
- % exemple = 2*rand(10,3) - 1;
- % etichete = sim(net,exemple');
- p = 2*rand(2,1000) -1;
- y = zeros(1,1000);
- y(p(1,:)-p(2,:) > 0 ) = 1;
- net = newp([-1 1;-1 1], 1);
- %Antrenare
- net.IW{1};
- net.b{1};
- y2 = sim(net,p);
- net = train(net,p,y);
- net.IW{1};
- net.b{1};
- plot( p(1,y==1),p(2,y==1),'*r');
- hold on;
- plot(p(1,y==0),p(2,y==0),'oc');
- plotpc(net.IW{1},net.b{1});
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement