public void correctlyClassified(T reference, T prediction) { samples++; // add all true positives! Span[] spans = asSpanArray(reference); for (Span span : spans) { addTruePositive(span.getType()); } }
public void missclassified(T reference, T prediction) { samples++; Span[] references = asSpanArray(reference); Span[] predictions = asSpanArray(prediction); Set<Span> refSet = new HashSet<>(Arrays.asList(references)); Set<Span> predSet = new HashSet<>(Arrays.asList(predictions)); for (Span ref : refSet) { if (predSet.contains(ref)) { addTruePositive(ref.getType()); } else { addFalseNegative(ref.getType()); } } for (Span pred : predSet) { if (!refSet.contains(pred)) { addFalsePositive(pred.getType()); } } }
public void correctlyClassified(T reference, T prediction) { samples++; // add all true positives! Span[] spans = asSpanArray(reference); for (Span span : spans) { addTruePositive(span.getType()); } }
public void correctlyClassified(T reference, T prediction) { samples++; // add all true positives! Span[] spans = asSpanArray(reference); for (Span span : spans) { addTruePositive(span.getType()); } }
public void missclassified(T reference, T prediction) { samples++; Span[] references = asSpanArray(reference); Span[] predictions = asSpanArray(prediction); Set<Span> refSet = new HashSet<>(Arrays.asList(references)); Set<Span> predSet = new HashSet<>(Arrays.asList(predictions)); for (Span ref : refSet) { if (predSet.contains(ref)) { addTruePositive(ref.getType()); } else { addFalseNegative(ref.getType()); } } for (Span pred : predSet) { if (!refSet.contains(pred)) { addFalsePositive(pred.getType()); } } }
public void missclassified(T reference, T prediction) { samples++; Span[] references = asSpanArray(reference); Span[] predictions = asSpanArray(prediction); Set<Span> refSet = new HashSet<>(Arrays.asList(references)); Set<Span> predSet = new HashSet<>(Arrays.asList(predictions)); for (Span ref : refSet) { if (predSet.contains(ref)) { addTruePositive(ref.getType()); } else { addFalseNegative(ref.getType()); } } for (Span pred : predSet) { if (!refSet.contains(pred)) { addFalsePositive(pred.getType()); } } }