Apply frozen quantile calibration to new samples
Source:R/singlesample-additional-within-sample.R
apply_frozen_quantile.RdMaps test-sample feature values to the training distribution using the
frozen empirical-CDF grid from fit_frozen_quantile. Each
test value is located in the training CDF, and the corresponding training
reference value is returned. This aligns the test distribution to the
training distribution in a monotone, feature-wise manner.
Usage
apply_frozen_quantile(fit, x_test, missing_features = c("error", "skip"))Arguments
- fit
A
frozen_quantile_fitobject fromfit_frozen_quantile.- x_test
Numeric matrix (samples \(\times\) features). All values must be non-negative.
- missing_features
"error"(default, fail-closed when training features are absent) or"skip"(process only shared features and return a reduced-column matrix).