You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: vignettes/ale-ALEPlot.Rmd
+17-16
Original file line number
Diff line number
Diff line change
@@ -226,8 +226,8 @@ data <-
226
226
Although gradient boosted trees generally perform quite well, they are rather slow. Rather than having you wait for it to run, the code here downloads a pretrained GBM model. However, the code used to generate it is provided in comments so that you can see it and run it yourself if you want to. Note that the model calls is based on `data[,-c(3,4)]`, which drops the third and fourth variables (`fnlwgt` and `education`, respectively).
227
227
228
228
```{r gbm model}
229
-
# To generate the code, uncomment the following lines.
230
-
# But it is slow, so this vignette loads a pre-created model object.
229
+
# # To generate the code, uncomment the following lines.
230
+
# # But they are slow, so this vignette loads a pre-created model object.
Finally, we again generate two-way interactions, this time based on probabilities instead of on log odds. However, probabilities might not be the best choice for indicating interactions because, as we see from the rugs in the one-way ALE plots, the GBM model heavily concentrates its probabilities in the extremes near 0 and 1. Thus, the plots' suggestions of strong interactions are likely exaggerated. In this case, the log odds ALEs shown above are probably more relevant.
372
372
373
373
```{r ale ixn prob, fig.width=7, fig.height=5}
374
-
# # To generate the code, uncomment the following lines.
375
-
# # But it is slow, so this vignette loads a pre-created model object.
374
+
# To generate the code, uncomment the following lines.
375
+
# But it is slow, so this vignette loads a pre-created model object.
376
376
# gbm_ale_ixn_prob <- ale_ixn(
377
-
# data[,-c(3,4)], gbm.data,
377
+
# # data[,-c(3,4)], gbm.data,
378
+
# data, gbm.data,
378
379
# pred_fun = yhat,
379
380
# x_intervals = 500,
380
381
# rug_sample_size = 600, # technical issue: rug_sample_size must be > x_intervals + 1
0 commit comments