Feature Impact. How to Customize the Sample Size in DataRobot
This article explains how to customize the sample size when calculating Feature Impact scores.
Feature Impact is calculated using permutation importance which has proven to be an excellent measure for determining which features affect a model the most. Having said that, permutation importance is computationally expensive to calculate, which is why DataRobot only uses a subset of the data to do the actual math.
To minimize the chances of having a suboptimal Feature Impact calculation, you can choose the sample size that will be used in the calculations. Currently, the maximum sample you can choose is 100,000 rows.
Defining Custom Sample Size
To choose your own custom sample size for Feature Impact calculations, navigate to the Feature Impact tab for the model of interest (Figure 1).
In the Feature Impact tab click the + icon (to the right of the Sample Size field).
Now you can choose the appropriate sample size. There are four different ways to do that:
- Specify the percent of rows to use.
- Specify the absolute number of rows to use.
- Choose from the three predefined “Snap To” options (quick, half, max).
Use the sample size slider.
All of these options are shown in Figure 3.
After you have finished setting up, just click Set Sample and Enable Feature Impact to kick off the calculations.
Recalculating Feature Impact
Feature Impact can be recalculated with a new sample size as many times as needed. To do this, go to the Feature Impact tab of the model and click Adjust sample size as shown in Figure 4.
This will display a window with the same options (as shown in Figure 3). Specify a new sample size and start the calculations again.
See the in-app Platform Documentation for Feature Impact.