Convenience wrapper that combines find_threshold_for_sensitivity() and evaluate_panel() to evaluate a panel at the operating point corresponding to a target sensitivity level. This is the recommended way to evaluate panels optimized with metric_specificity_at_sensitivity().

evaluate_panel_at_sensitivity(
  panel,
  x,
  y,
  target_sensitivity = 0.9,
  objectives = define_objectives(metrics = c("sensitivity", "specificity", "auc")),
  positive = NULL,
  feature_transform = NULL,
  assay = NULL
)

Arguments

panel

A BiomarkerPanelResult.

x

Validation feature matrix, or a list of matrices for multi-cohort evaluation.

y

Validation binary response factor, or a list of factors when x is a list.

target_sensitivity

The desired sensitivity level (default 0.90). Must be between 0 and 1.

objectives

Optional override for objectives. Defaults to sensitivity, specificity, and auc.

positive

Label treated as the positive class. Defaults to the value stored in the panel, or "Yes".

feature_transform

Optional feature transform name. Defaults to the transform stored in the fitted panel.

assay

For SummarizedExperiment inputs, assay name or index.

Value

Same as evaluate_panel(), but with cutoff_prob set to the threshold that achieves the target sensitivity. The result also includes a target_sensitivity_info element with details about the threshold selection.

Examples

# After optimizing with specificity_at_sensitivity:
# result <- optimize_panel(x, y, objectives = build_objectives(
#   metrics = c("specificity_at_sensitivity", "num_features")
# ))
#
# Evaluate at 90% sensitivity operating point:
# eval <- evaluate_panel_at_sensitivity(result, x_val, y_val)