Apply a (nested list) of rROC results to new data
apply_restriction.RdRestriction returns an informative range which tells that some samples should be
discarded according to their predictor value. This function applies the restriction
to a new dataset. Predictor values outside the informative range are imputed with
removed_impute.
Arguments
- object
A (nested list) of rROC results. See
rROCfor details.- newdata
A data frame with all predictor variables.
- feature
The current feature. If
objectis a single restrictedROC object, this is the name of the feature. Ifobjectis a (nested list), this is the name of the current list element. Example:list("outcome_1"=list("feature_1"=rroc_result))featureis"feature_1"whenrroc_resultis processed when rroc_result is detected.- removed_impute
The value to impute for samples outside the informative range.
Value
A list with three elements:
predictions: A data frame with the original predictor values and the imputed values. It has three columns:predictoris the original predictor value.
keepis a logical vector that indicates whether the sample is inside the informative range.
boundedis the imputed value.
thresholds: A data frame with the feature, threshold, the part of the predictor that was used and the imputed value for predictor values outside the informative range. The informative range is then:low(-Inf, threshold)high(threshold, Inf)