/** * Returns a string containing the various performance measures for the * current object */ @Override public String toString() { StringBuffer res = new StringBuffer(); res.append(getTruePositive()).append(' '); res.append(getFalseNegative()).append(' '); res.append(getTrueNegative()).append(' '); res.append(getFalsePositive()).append(' '); res.append(getFalsePositiveRate()).append(' '); res.append(getTruePositiveRate()).append(' '); res.append(getPrecision()).append(' '); res.append(getRecall()).append(' '); res.append(getFMeasure()).append(' '); res.append(getFallout()).append(' '); return res.toString(); }
/** * Returns a string containing the various performance measures for the * current object */ @Override public String toString() { StringBuffer res = new StringBuffer(); res.append(getTruePositive()).append(' '); res.append(getFalseNegative()).append(' '); res.append(getTrueNegative()).append(' '); res.append(getFalsePositive()).append(' '); res.append(getFalsePositiveRate()).append(' '); res.append(getTruePositiveRate()).append(' '); res.append(getPrecision()).append(' '); res.append(getRecall()).append(' '); res.append(getFMeasure()).append(' '); res.append(getFallout()).append(' '); return res.toString(); }
tc.setFalseNegative(tc.getFalseNegative() + cumulativePos); tc.setFalsePositive(tc.getFalsePositive() - cumulativeNeg); tc.setTrueNegative(tc.getTrueNegative() + cumulativeNeg); threshold = probs[sorted[i]]; insts.add(makeInstance(tc, threshold)); if (tc.getFalseNegative() != totPos || tc.getTrueNegative() != totNeg) { tc = new TwoClassStats(0, 0, totNeg, totPos); threshold = probs[sorted[sorted.length - 1]] + 10e-6;
tc.setFalseNegative(tc.getFalseNegative() + cumulativePos); tc.setFalsePositive(tc.getFalsePositive() - cumulativeNeg); tc.setTrueNegative(tc.getTrueNegative() + cumulativeNeg); threshold = probs[sorted[i]]; insts.add(makeInstance(tc, threshold)); if (tc.getFalseNegative() != totPos || tc.getTrueNegative() != totNeg) { tc = new TwoClassStats(0, 0, totNeg, totPos); threshold = probs[sorted[sorted.length - 1]] + 10e-6;
vals[count++] = tc.getFalseNegative(); vals[count++] = tc.getFalsePositive(); vals[count++] = tc.getTrueNegative(); vals[count++] = tc.getFalsePositiveRate(); vals[count++] = tc.getTruePositiveRate(); vals[count++] = tc.getFMeasure(); double ss = (tc.getTruePositive() + tc.getFalsePositive()) / (tc.getTruePositive() + tc.getFalsePositive() + tc.getTrueNegative() + tc .getFalseNegative()); vals[count++] = ss;
vals[count++] = tc.getFalseNegative(); vals[count++] = tc.getFalsePositive(); vals[count++] = tc.getTrueNegative(); vals[count++] = tc.getFalsePositiveRate(); vals[count++] = tc.getTruePositiveRate(); vals[count++] = tc.getFMeasure(); double ss = (tc.getTruePositive() + tc.getFalsePositive()) / (tc.getTruePositive() + tc.getFalsePositive() + tc.getTrueNegative() + tc .getFalseNegative()); vals[count++] = ss;