Creates row annotations showing predicted vs true class labels and probabilities, with optional data_type coloring.
prediction_annotation(
sorted_dat,
target_lab,
task = c("classification", "regression"),
label_map = NULL,
label_map_colors = NULL,
type_palette = "Dark2",
label_palette = "OrRd",
n_label_color = 9,
prop_palette = gray,
n_prop_colors = 11,
gap_mm = unit(1, "mm")
)A rowAnnotation object for predictions and truth.
List from sorted_mat(), containing dat_sorted with predictions.
Name of true label column in dat_sorted.
Character. Type of task: "classification" or "regression".
Optional named vector to map raw labels to new labels.
Optional named vector of colors for mapped labels.
RColorBrewer palette for data_type (default "Dark2").
Function or vector of colors for true and predicted value (default OrRd).
Number of colors for probability palette (default 9).
Function or vector of colors for probability gradient (default gray).
Number of colors for probability palette (default 11).
Unit for gap between annotations (default unit(1, "mm") ).