Is there an already existing function to get a partial dependence plot from an xgboost model in R? I saw examples of using mlr
package, but it seems to require an mlr
-specific wrapper class. I am a little unclear if there is a way to convert an xgboost
model into that class.
A partial dependence (PD) plot depicts the functional relationship between a small number of input variables and predictions. They show how the predictions partially depend on values of the input variables of interest. For example, a PD plot can show whether the probability of flu increases linearly with fever.
The partial dependence plot (short PDP or PD plot) shows the marginal effect one or two features have on the predicted outcome of a machine learning model (J. H. Friedman 200130). A partial dependence plot can show whether the relationship between the target and a feature is linear, monotonic or more complex.
Partial dependence plots (PDP) is a useful tool for gaining insights into the relationship between features and predictions. It helps us understand how different values of a particular feature impact model's predictions.
The y-axis of a partial dependence plot for regression represents the marginal impact of the independent variable to the dependent variable. E.g. if the line is at 0, then for that value of the independent variable, there is 0 impact to the dependent variable.
I have been working on an R package, pdp
, for constructing partial dependence plots--https://github.com/bgreenwell/pdp. I was able to get it to work with XGBoost models, but it is still experimental. There is a vignette/manuscript in progress in the manuscript folder that may help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With