Advertisement
desdemona

a wez

Apr 15th, 2013
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 1.24 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-2);
  27. X(:,end) = [];
  28. X(:,end) = [];
  29. X(:,end) = [];
  30. net = newff([0 1; 0 1; 0 1; 0 1; 0 1; 0 1 ; 0 1], [30 8 1], {'tansig' 'purelin' 'purelin'}, 'trainlm');
  31. net =init(net);
  32. net.trainParam.epochs = 500;
  33. net.trainParam.goal=0.000000001;
  34. net=train(net, X', Y');
  35. [X1 Y1] = meshgrid(0:0.1:3);
  36. Z=X1;
  37. Z(:)=sim(net,[X1(:)'; Y1(:)']);
  38. surf(X1, Y1, Z);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement