R/threshold_calibration.R
calibrate_panel.RdPerforms NP threshold calibration on a fitted panel using held-out data,
computing per-cohort metrics and weighted variance for transferability
assessment. Returns a TransferablePanelResult extending the input panel.
calibrate_panel(
panel,
x_heldout,
y_heldout,
cohort_heldout = NULL,
np_alpha = 0.15,
np_delta = 0.05
)A BiomarkerPanelResult from fit_panel().
Held-out feature matrix (raw base features).
Held-out response vector (factor with levels "No", "Yes").
Optional cohort factor for held-out samples.
Type I error rate for NP threshold (default 0.15).
Tolerance parameter (default 0.05).
A TransferablePanelResult with NP threshold, per-cohort metrics,
and weighted variance.