Performs 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
)

Arguments

panel

A BiomarkerPanelResult from fit_panel().

x_heldout

Held-out feature matrix (raw base features).

y_heldout

Held-out response vector (factor with levels "No", "Yes").

cohort_heldout

Optional cohort factor for held-out samples.

np_alpha

Type I error rate for NP threshold (default 0.15).

np_delta

Tolerance parameter (default 0.05).

Value

A TransferablePanelResult with NP threshold, per-cohort metrics, and weighted variance.