Closed wisamb closed 1 year ago
Hi @wisamb i suspect it’s because the variable I question is treated as factor in the random forest but numeric (as all inputs) in xgboost, and the plotting behavior depends on the feature types.
Thank you @bgreenwell! That was exactly it.
Can you tell me why I get the first plot from
pdp::partial
from a random forest algorithm (either randomForest or ranger package)? Rather than the second plot, which I get running the same code, same data but using an xgboost? How can I get the second plot using the either randomForest or ranger package?