Skip to main content
. 2026 Oct 16;16(20):3368. doi: 10.3390/diagnostics16203368
Algorithm 2: Source-Only Reliability Fitting and External Evaluation
Input:
Trained primary diagnostic checkpoint; probability-calibration subset; conformal-calibration subset; source reliability-threshold partition; source test set; PAD-UFES-20.
Output:
 Calibrated probabilities, conformal prediction sets, source-fitted selective decisions, and external reliability measurements.
Method:
  1. Freeze the trained primary diagnostic checkpoint.

  2. Fit probability calibration using only the designated source calibration subset.

  3. Apply the fixed calibration parameters to the independent conformal-calibration subset.

  4. Estimate class-conditional conformal thresholds using this subset only.

  5. Apply the fixed calibration and conformal pipeline to the source reliability-threshold partition.

  6. Compute calibrated-confidence risk, predictive entropy, logit-derived energy, and conformal-set size.

  7. Fit the source selective-classification rule and freeze all scaling parameters and decision thresholds.

  8. Apply the complete fixed pipeline to the source test set and PAD-UFES-20 without adaptation.

  9. Report discrimination, calibration, conformal, uncertainty-based error-detection, and selective-classification performance.

  10. Perform DDI OOD and explanation-stability analyses separately using the prespecified fixed audit checkpoint.

Constraint: PAD-UFES-20 and DDI results are not used to modify the diagnostic model, calibration parameters, conformal predictor, or selective-classification thresholds.