Portable bindings for long ROC records. Each split/class/fold identifies one
curve. The reserved fold label aggregate identifies pooled predictions.
Compiles to LineSeriesOption in src/chart/line/LineSeries.ts,
GridOption in src/coord/cartesian/GridModel.ts, and LegendOption in
src/component/legend/LegendModel.ts.
Usage
ROCConfig(
dat_path = NULL,
title = NULL,
origin = NULL,
writer = NULL,
legend_position = "top",
legend_placement = "outside",
fpr = "fpr",
tpr = "tpr",
auc = NULL,
class_label = NULL,
split = NULL,
fold = NULL,
omitted = NULL,
variant = "aggregate",
digits = 3L,
diagonal = TRUE,
diagonal_color = "#888888",
palette = NULL,
legend = TRUE,
square = TRUE,
line_width = 2,
fold_opacity = 0.45,
xlab = "False positive rate",
ylab = "True positive rate"
)Arguments
- dat_path
Optional Character: Path to the data, read at draw time. The serializable alternative to passing
datatodraw().- title
Optional Character: Chart title.
- origin
Optional Named character {"user", "default", "derived"}: Where each value came from, one entry per settable property. Absent on an authored config; written by the interface that resolved it.
- writer
Optional Named character: Which interface wrote the config, as
nameandversion. Absent on an authored config.- 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.
- fpr
Character: Column containing false positive rates.
- tpr
Character: Column containing true positive rates.
- auc
Optional Character: Optional supplied AUC column; unset integrates the supplied vertices.
- 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 AUC labels and tooltip values.
- diagonal
Logical: Show an independent chance diagonal.
- diagonal_color
Character: Chance-line color.
- palette
Optional Character: Group colors; unset uses the chart theme.
- legend
Logical: Show group labels and AUC summaries.
- 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.
Statistical semantics
Vertices are ordered by FPR then TPR and joined without smoothing. Curves
must be monotone and include (0, 0) and (1, 1). Supplied AUC is authoritative
and may describe a higher-resolution curve. Without an AUC binding, the
supplied vertices define trapezoidal AUC. An undefined curve is represented
by missing FPR, TPR, and AUC and is reported in the console when omitted.
Per-resample legends report the unweighted mean and sample SD of defined
fold AUCs, with available/total curve counts. SD is NA for one defined fold.
Pooled AUC is never inferred from per-fold AUCs.
The legend uses the shared position and placement controls. Curve identity
and AUC share a line; long labels wrap to the available width. All entries
remain present in static SVG output, without a scrolling legend.
Hover describes the selected curve, including its resample identifier.
Numeric tooltip labels use digits; coordinates and AUCs retain their full
precision in the compiled data.