The HPFOREST Procedure
Loss Reduction
Loss reduction is also called Gini increase, Gini importance, or impurity reduction. It was introduced in Breiman et al. (1984) for decision trees, later modified for gradient boosting machines (Friedman 2001), and later used in forests (Breiman and Cutler 2003).
The importance of variable v is proportional to the sum of the reduction in node impurity, summed over nodes that v splits. Breiman et al. (1984) and Breiman and Cutler (2003) introduce the impurity measure with the Gini splitting criterion, hence the name Gini importance. However, Gini impurity is defined only for a categorical target. For an interval target, the most common node impurity measure is the sum of square errors. Friedman (2001) uses a square root at the end of the calculation to revert back to the scale of the target. This can fail when you use validation data because the impurity reduction can be negative. Therefore, the HPFOREST procedure computes both the reduction in absolute error and the reduction in square error.
PROC HPFOREST uses the word loss instead of impurity to associate the measure of importance with the reduction in loss from using the model. A loss function is a statistic that measures how well a model fits data. Average square error is a common loss function. Given a loss function, the next equation defines an associated measure of variable importance. The sum over variables of the associated variable importance equals the total loss when a model is not used minus the loss when a model is used. In other words, the loss reduction variable importance assigns shares to the variables of the total reduction in the loss that the model achieves.
The loss reduction variable importance for input v in tree T is computed as
where the sum is over internal nodes in T and where is 1 if v is the splitting variable in and 0 otherwise. is the reduction in loss from splitting . A loss function maps a response value and a prediction to a number that represents how bad the prediction is. Square error loss is most common,
where
For an interval target, PROC HPFOREST also computes absolute error loss,
where
For a categorical target, the formula for SSE() reduces to
where is the proportion of the validation data with target value j, and N, , and are evaluated in node . SSE() for training data equals the Gini impurity index. Loss reduction variable importance is commonly called Gini importance for this reason.
Another measure of importance for a categorical target is based on the margin, the probability of the true class minus the maximum probability of the other classes. A good model increases the margin. Therefore, loss reduction variable importance uses the negative of margin.
where
and is the number of class j observations in in the data set being used to evaluate the variable importance.
When the target is binary, variable importance based on the margin equals twice that of the variable importance based on the Gini index.
Copyright © SAS Institute Inc. All rights reserved.