Computes partial dependence between expected conditional response and all values of its target feature, knowing the distribution of all others features in the data (e.g. marginal effect of the target feature over the response)
Xtest: a matrix or data frame specifying test (or train) data.
importanceObject: an object of class importance.
whichFeature: feature that one needs to see dependence with responses (either train responses or predicted values).
whichOrder: at which order, partial dependence does it need to be computed ?
outliersFilter: filter outliers ?
plotting: plot partial dependence ?
followIdx: not currently used.
maxClasses: for variables with discrete values that need to be treated as categorical for a better visualization and that have more than 'maxClasses' unique values. Or for categorical variables that one knows to be categorical but whose data are stored as a R matrix.
bg: background color for the plot. Type 'bg = "none"' to get a white background.
Details
Partial dependence shows how expected conditional response is evolving with its target feature, knowing the distribution of all others features. For example, if one wants to know how response is moving, on average, depending on one target feature and for all possible values of the others features. For Classification, partial dependence shows the dependence of each important variable over classes. One key advantage of partial dependence is to allow extrapolation for ensemble models. Note that this version is inspired by Friedman (2001) ideas, but uses a different implementation.
Returns
a matrix containing feature values and expected conditional responses.
References
Friedman, J.H., 2001. Greedy function approximation: A gradient boosting machine. Ann. Statist. 29, 1189-1232.