(final double[] pred)
| 14 | |
| 15 | |
| 16 | public static int argmax(final double[] pred) { |
| 17 | int choice = 0; |
| 18 | final int n = pred.length; |
| 19 | for(int i=1;i<n;++i) { |
| 20 | if(pred[i]>pred[choice]) { |
| 21 | choice = i; |
| 22 | } |
| 23 | } |
| 24 | return choice; |
| 25 | } |
| 26 | |
| 27 | public static boolean isGoodPrediction(final double[] pred, final ExampleRow ei) { |
| 28 | final int predi = argmax(pred); |
no outgoing calls
no test coverage detected