Contents
visualize$evaluate$performance
Predictive performance curves and fit views
Renders evaluate$performance()'s curves from its own artifacts:
a binary outcome draws ROC or precision-recall from the confusion counts,
a continuous outcome draws binned score against outcome from
score.outcome.bins. tpr/fpr/precision/recall are a per-row
transform of the confusion counts, never a recomputation of the estimator
itself -- any AUC or R-squared shown is read from the matching result row.
Usage
visualize.evaluate.performance(
results,
x = "fpr",
y = "tpr",
theme = c("polygenius", "none")
)Arguments
| Argument | Description |
|---|---|
results | A [PolyGeniusEvaluation](/reference/evaluate/) of evaluate$performance(). |
x | Character scalars, one of "fpr", "tpr", "recall", "precision". Default x = "fpr", y = "tpr" draws ROC with the diagonal; x = "recall", y = "precision" draws PR. Ignored for a continuous outcome, whose axes are fixed to score and outcome. |
y | Character scalars, one of "fpr", "tpr", "recall", "precision". Default x = "fpr", y = "tpr" draws ROC with the diagonal; x = "recall", y = "precision" draws PR. Ignored for a continuous outcome, whose axes are fixed to score and outcome. |
theme | One of "polygenius" (default), "none". Plot theme. "none" gives a bare theme_minimal() to style yourself; palette colors are applied either way. |
Value
A ggplot, faceted by outcome (columns) and stratum (rows). A
results holding both binary and continuous outcomes returns a
patchwork of the two panels stacked; use &, not +, to apply a theme
or scale to both panels, as patchwork composition requires.
Details
The figure has one facet per outcome x stratum (binary) or outcome x
stratum x model (continuous), so it grows with the number of outcomes,
split.by levels and, for a continuous outcome, models. There is no bound
on that count: a large grid renders a large figure.
Examples
perf <- evaluate$performance(data, outcomes = case)
visualize$evaluate$performance(perf)
visualize$evaluate$performance(perf, x = "recall", y = "precision")See Also
evaluate$performance(), which produces results.
Other visualize-evaluate:
visualize.evaluate.association(),
visualize.evaluate.compare(),
visualize.evaluate.incremental(),
visualize.evaluate.profile(),
visualize.evaluate.redundancy(),
visualize.evaluate.stratification()