T
- type of outputE
- type of evaluation@FunctionalInterface public interface EvaluationRenderer<T extends Output<T>,E extends Evaluation<T>>
Evaluation
into a String.
For example, an implementation might produce
Modifier and Type | Method and Description |
---|---|
String |
apply(E evaluation)
Convert the evaluation to a string.
|
String apply(E evaluation)
EvaluationRenderer<Label, LabelEvaluation> renderer = (LabelEvaluation eval) -> { StringBuilder sb = new StringBuilder(); sb.append(String.format("macro F1: %.2f", eval.macroAveragedF1())); sb.append(String.format("micro F1: %.2f", eval.microAveragedF1())); return sb.toString(); } LabelEvaluation evaluation = ... System.out.println(renderer.apply(evaluation));
evaluation
- The evaluation to render.Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.