Advertisement
desdemona

szatan

Apr 15th, 2013
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 1.21 KB | None | 0 0
  1. X=[1 1; 2 2; 2 1; 1 2];
  2. Y =[1; 1; 0; 0];
  3. net = newff([0 3; 0 3], [30 8 1], {'tansig' 'purelin' 'purelin'}, 'trainlm');
  4. net =init(net);
  5. net.trainParam.epochs = 200;
  6. net.trainParam.goal=0.0000001;
  7. net=train(net, X', Y');
  8. [X1 Y1] = meshgrid(0:0.1:3);
  9. Z=X1;
  10. Z(:)=sim(net,[X1(:)'; Y1(:)']);
  11. surf(X1, Y1, Z);
  12.  
  13. %  cp  (cytoplasm)                                    143 000
  14. %  im  (inner membrane without signal sequence)        77 001              
  15. %  pp  (perisplasm)                                    52 010
  16. %  imU (inner membrane, uncleavable signal sequence)   35 011
  17. %  om  (outer membrane)                                20 100
  18. %  omL (outer membrane lipoprotein)                     5 101
  19. %  imL (inner membrane lipoprotein)                     2 110
  20. %  imS (inner membrane, cleavable signal sequence)      2 111
  21.  
  22.  X = importdata('nowy3.txt');
  23. % Y =
  24. %load nowy3.txt
  25. %X = nowy3.txt;
  26. Y = X(:,end);
  27. X(:,end) = [];
  28. net = newff([0 1; 0 1; 0 1; 0 1; 0 1; 0 1 ; 0 1], [30 8 1], {'tansig' 'purelin' 'purelin'}, 'trainlm');
  29. net =init(net);
  30. net.trainParam.epochs = 500;
  31. net.trainParam.goal=0.0000001;
  32. net=train(net, X', Y');
  33. [X1 Y1] = meshgrid(0:0.1:3);
  34. Z=X1;
  35. Z(:)=sim(net,[X1(:)'; Y1(:)']);
  36. surf(X1, Y1, Z);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement