Advertisement
mime1337

Untitled

Feb 13th, 2016
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.22 KB | None | 0 0
  1. public int check(int values[]){
  2.        
  3.         double result = 0;
  4.        
  5.         for (int i = 0; i < values.length; i++){
  6.             result += weights[i] * values[i];
  7.         }
  8.        
  9.         if(result > 0.2) return 1;  // result - bias > 0
  10.        
  11.         return 0;
  12.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement