MCPcopy Index your code
hub / github.com/WinVector/Logistic / isGoodPrediction

Method isGoodPrediction

src/com/winvector/opt/impl/HelperFns.java:27–31  ·  view source on GitHub ↗
(final double[] pred, final ExampleRow ei)

Source from the content-addressed store, hash-verified

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;

Callers 2

mapMethod · 0.95
observeMethod · 0.80

Calls 2

argmaxMethod · 0.95
categoryMethod · 0.65

Tested by

no test coverage detected