Set Up a Precision-Recall Plot Configuration
Usage
setup_PRConfig(
recall = "recall",
precision = "precision",
ap = NULL,
prevalence = NULL,
class_label = NULL,
split = NULL,
fold = NULL,
omitted = NULL,
variant = "aggregate",
digits = 3L,
baseline = TRUE,
palette = NULL,
legend = TRUE,
legend_position = "top",
legend_placement = "outside",
legend_title = NULL,
square = TRUE,
line_width = 2,
fold_opacity = 0.45,
xlab = "Recall",
ylab = "Precision",
title = NULL,
dat_path = NULL,
origin = NULL,
writer = NULL
)Arguments
- recall
Character: Column containing recall values.
- precision
Character: Column containing precision values.
- ap
Optional Character: Optional supplied average precision column; unset computes it from the supplied vertices.
- prevalence
Optional Character: Optional positive-class prevalence column, constant within each curve.
- class_label
Optional Character: Optional positive-class label column.
- split
Optional Character: Optional sample or model label column.
- fold
Optional Character: Optional resample column; aggregate identifies pooled curves.
- omitted
Optional Character: Optional omitted-observation count column, constant within each curve.
- variant
Character: Draw pooled curves or separate resample curves.
- digits
Integer: Decimal places for average precision labels and tooltip values.
- baseline
Logical: Show the prevalence baseline of each curve group.
- palette
Optional Character: Group colors; unset uses the chart theme.
- legend
Logical: Show group labels and average precision summaries.
- legend_position
Character {"top", "bottom", "left", "right", "top-left", "top-right", "bottom-left", "bottom-right"}: Legend anchor. Top/bottom anchors use horizontal rows; left/right anchors use a vertical column. Corner anchors align within the top or bottom row.
- legend_placement
Character {"outside", "inside"}: Relation to the plotting area. Outside placement reserves space for the complete legend; inside placement overlays the data. Neither setting adds a missing legend.
- legend_title
Optional Character: Title drawn with the legend or colorbar: above left/right legends and vertical colorbars, before the first row of top/bottom legends and horizontal colorbars.
NULLdraws no title. A title does not add a missing legend.- square
Logical: Keep the plotting grid square.
- line_width
Numeric: Curve stroke width in pixels.
- fold_opacity
Numeric: Opacity of individual resample curves.
- xlab
Character: Horizontal axis label.
- ylab
Character: Vertical axis label.
- title
Optional Character: Chart title.
- dat_path
Optional Character: Path to the data, read at draw time. The serializable alternative to passing
datatodraw().- origin
Optional Named character: Per-property provenance.
- writer
Optional Named character: Interface name and version.
Value
A PRConfig object.
Examples
setup_PRConfig(class_label = "class", split = "split", fold = "fold", ap = "ap")#> <PRConfig>
#>
#> type: <chr> pr
#> dat_path: <NUL> NULL
#> title: <NUL> NULL
#> origin: <chr> default, default, default, default, ...
#> writer: <NUL> NULL
#> legend_position: <chr> top
#> legend_placement: <chr> outside
#> legend_title: <NUL> NULL
#> recall: <chr> recall
#> precision: <chr> precision
#> ap: <chr> ap
#> prevalence: <NUL> NULL
#> class_label: <chr> class
#> split: <chr> split
#> fold: <chr> fold
#> omitted: <NUL> NULL
#> variant: <chr> aggregate
#> digits: <int> 3
#> baseline: <lgc> TRUE
#> palette: <NUL> NULL
#> legend: <lgc> TRUE
#> square: <lgc> TRUE
#> line_width: <nmr> 2.00
#> fold_opacity: <nmr> 0.45
#> xlab: <chr> Recall
#> ylab: <chr> Precision
#>