Advertisement
Guest User

adalineop

a guest
Oct 22nd, 2019
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. package adalinetraining;
  2.  
  3.  
  4.  
  5. public class AdalineOperation {
  6.  
  7. public static void main(String[] args) {
  8. double[] pesos = { 0.01222577719907951, 0.004762759645191947, -0.009727417287218335, 0.0020898259147021994 };
  9.  
  10. double[][] amostras = new double[][] {
  11. {-1.0, -1.0,},
  12. {0.0, 0.0},
  13. {1.0,2.0},
  14. {1.0,3.0},
  15. {-1.0,-1.0},
  16. {2.0,2.0},
  17. {2.0,1.0},
  18. {2.0,3.0},
  19. {-1.0,1.0},
  20. {-2.0,2.0},
  21. {1.0,-1.0},
  22. {-2.0, -2.0},
  23. {3.0,0.0},
  24. {-2.0,-1.0},
  25. {3.0,1.0}};
  26.  
  27. double[] saidas = new double[] { -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 1.0 };
  28.  
  29. double eqmMedio = Eqm.calculateEQM(amostras, saidas, pesos);
  30.  
  31. System.out.println("EQM medio " + eqmMedio);
  32. }
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement