(final double[] pred, final ExampleRow ei)
| 25 | } |
| 26 | |
| 27 | public static boolean isGoodPrediction(final double[] pred, final ExampleRow ei) { |
| 28 | final int predi = argmax(pred); |
| 29 | final boolean good = predi==ei.category(); |
| 30 | return good; |
| 31 | } |
| 32 | |
| 33 | private static final class AccuracyCounter<T extends ExampleRow> implements ReducibleObserver<T,AccuracyCounter<T>> { |
| 34 | public long n = 0; |