Skip to contents

The 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.

Usage

ci_predict_parsnip(object, newdata)

Arguments

object

A fitted ci_tree or ci_forest engine object.

newdata

Data containing the predictors required by the fitted model.

Value

A tibble with predictions and partition-scoring metadata.