Computes Friedman's H-statistic (Friedman & Popescu, 2008) for all pairwise
interaction effects in a gbm
model.
gbm_2way(object, data, var.names = object$var.names, n.trees = object$n.trees)
A data frame with the following three columns:
The name of the first feature.
The name of the second feature.
The corresponding H-statistic.
The resulting rows are sorted in descending order of h
.
A gbm
object.
Data frame containing the original training data (or representative sample thereof).
Character string specifying the predictor names to consider.
Integer specifying the number of trees to use.
Friedman, J. H., & Popescu, B. E. (2008). Predictive Learning via Rule Ensembles. The Annals of Applied Statistics, 2(3), 916–954. http://www.jstor.org/stable/30245114