`predictorImportance`

computes estimates of predictor
importance for `tree`

by summing changes in the *risk* due
to splits on every predictor and dividing the sum by the number of
branch nodes. If `tree`

is grown without surrogate
splits, this sum is taken over best splits found at each branch node.
If `tree`

is grown with surrogate splits, this sum
is taken over all splits at each branch node including surrogate splits. `imp`

has
one element for each input predictor in the data used to train `tree`

.
Predictor importance associated with this split is computed as the
difference between the risk for the parent node and the total risk
for the two children.

Estimates of predictor importance do not depend on the order
of predictors if you use surrogate splits, but do depend on the order
if you do not use surrogate splits.

If you use surrogate splits, `predictorImportance`

computes
estimates before the tree is reduced by pruning or merging leaves.
If you do not use surrogate splits, `predictorImportance`

computes
estimates after the tree is reduced by pruning or merging leaves.
Therefore, reducing the tree by pruning affects the predictor importance
for a tree grown without surrogate splits, and does not affect the
predictor importance for a tree grown with surrogate splits.