Skip to contents

Generate predictions, uncertainty estimates, and SHAP values for new data. Models that were skipped during training are returned unchanged.

Usage

make_new_data_predictions(model, name, indx, total, new_data)

Arguments

model

The model object.

name

The name of the perturbation.

indx

Integer index used, for progress report.

total

Integer of the total number of perturbations passed to this function, for progress report.

new_data

A dataframe of new cases with predictors as columns. Sample names are row names.

Value

The input model object with prediction outputs added under new_data, including predictions, uncertainty estimates, target-event probabilities, row-wise compressed SHAP values, and feature-contribution summaries. Models skipped during training are returned unchanged.

Examples

if (FALSE) { # \dontrun{
make_new_data_predictions(my_model, "ko_ctnnb1", 1, 1, my_new_data)
} # }