R/evaluate_sensitivity.R
evaluate_panel_at_sensitivity.RdConvenience 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
)A BiomarkerPanelResult.
Validation feature matrix, or a list of matrices for multi-cohort evaluation.
Validation binary response factor, or a list of factors when x is
a list.
The desired sensitivity level (default 0.90). Must be between 0 and 1.
Optional override for objectives. Defaults to sensitivity, specificity, and auc.
Label treated as the positive class. Defaults to the value
stored in the panel, or "Yes".
Optional feature transform name. Defaults to the transform stored in the fitted panel.
For SummarizedExperiment inputs, assay name or index.
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.
# 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)