Skip to content

Commit

Permalink
Optimize graphical details
Browse files Browse the repository at this point in the history
  • Loading branch information
nanxstats committed Apr 27, 2024
1 parent c73fc89 commit c7a1d98
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions vignettes/stackgbm.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -221,16 +221,24 @@ knitr::kable(df, digits = 4, caption = "AUC values from four models on training

Plot the ROC curves on the independent test set:

```{r, roc-curves, message=FALSE, fig.asp = 1}
pal <- c("#e69f00", "#56b4e9", "#009e73", "#f0e442")
plot(smooth(roc_stack_te), col = pal[1])
plot(smooth(roc_xgb_te), col = pal[2], add = TRUE)
plot(smooth(roc_lgb_te), col = pal[3], add = TRUE)
plot(smooth(roc_cat_te), col = pal[4], add = TRUE)
```{r}
#| roc-curves,
#| message=FALSE,
#| fig.asp=1,
#| fig.width=5,
#| fig.dpi=300,
#| fig.align="center",
#| out.width="65%"
pal <- c("#e15759", "#f28e2c", "#59a14f", "#4e79a7", "#76b7b2")
plot(smooth(roc_stack_te), col = pal[1], lwd = 1)
plot(smooth(roc_xgb_te), col = pal[2], lwd = 1, add = TRUE)
plot(smooth(roc_lgb_te), col = pal[3], lwd = 1, add = TRUE)
plot(smooth(roc_cat_te), col = pal[4], lwd = 1, add = TRUE)
legend(
"bottomright",
col = pal, lwd = 2,
col = pal,
lwd = 2,
legend = c("stackgbm", "xgboost", "lightgbm", "catboost")
)
```
Expand Down

0 comments on commit c7a1d98

Please sign in to comment.