Reporting
Available in v0.1.0Every result, report and comparison exports to text, JSON, pandas, Markdown, LaTeX, HTML and CSV. save() picks the format from the file extension.
import evalsuite as es
result = es.evaluate(y_true, y_pred, y_prob=y_prob)
result.to_latex(caption="Model evaluation results", label="tab:results")
result.save("report.html") # standalone page: metrics, per-class tables, confusion matrix
result.save("results.csv") # columns: metric, name, label, value
result.save("results.json")
report = es.classification_report(y_true, y_pred)
report.save("report.md")Plots
With the plot extra installed, es.plot draws ROC, precision-recall, calibration, confusion-matrix, residual and model-comparison figures. Each returns a Matplotlib Axes, and every number in a legend comes from EvalSuite's own metrics.
ax = es.plot.roc(y_true, {"baseline": prob_a, "candidate": prob_b})
ax.figure.savefig("roc.png", dpi=300)
es.plot.calibration(y_true, y_prob)
es.plot.confusion_matrix(y_true, y_pred)
es.plot.residuals(y_true, y_pred, kind="predicted")Later releases add es.plot.decision_curve (v0.2.0) and the vision figures es.plot.segmentation, es.plot.per_class and es.plot.detection_pr (v0.3.0). Segmentation and detection reports export to the same formats with save().
HTML reports contain no scripts and escape all text. Raw predictions are never included.