Detect Global Pre-Loop Imputation (Leakage Check)
Source:R/safe-preprocessing.R
check_no_premature_imputation.RdChecks whether a feature matrix has already been imputed (no NAs remaining) when NAs are expected. Call this at the top of a CV loop to detect accidental global imputation.