Predict risks and retain CI partitions for tidymodels scoring
Source:R/ci_parsnip_formula.R
ci_predict_parsnip.RdThe numeric prediction method used by the ineqTrees parsnip engines.
Keeps .pred as the predicted outcome and adds .ci_node, .ci_type,
.ci_training_gain, and .ci_training_root for ci_tuning_metric_set().
Tree node IDs are integers. Forest node IDs are a list of integer vectors,
with one entry per member tree for each observation.
Training diagnostics use the fitted analysis sample. Forest gains average the gains of member-tree partitions applied to that whole analysis sample, rather than scoring each member's bootstrap sample separately. Risk predictions use the same node assignments as the scoring metadata. Factor levels absent from a member's sample retain partykit's probabilistic routing behaviour. Saved predictions identify the assignments actually used.