Advertisement
Guest User

Untitled

a guest
May 2nd, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Octave 0.53 KB | None | 0 0
  1. input_len = length(input);
  2. shuffled_array = randperm(input_len);
  3. input = input(shuffled_array,:);
  4. output = output(shuffled_array,:);
  5. %disp(output);
  6. net = feedforwardnet([3 2]);
  7. %net = feedforwardnet([4 3]);
  8. net.layers{3}.transferFcn = 'logsig';
  9.  
  10. % podesavanje parametara za treniranje
  11. net.divideParam.trainRatio = 0.8; % training set [%]
  12. net.divideParam.valRatio = 0; % validation set [%]
  13. net.divideParam.testRatio = 0.2; % test s
  14. % neural network training
  15. [net,tr,Y,E] = train(net,input',output');
  16. netoutput = sim(net, input');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement