Machine Learning
2024-03-31
1 / 1
R package
SHAP for XGBoost in R: SHAPforxgboost
Yang Liu
/
2019-07-18
I wrote the R package SHAPforxgboost to cover all the plotting functions illustrated in this post. This post serves as the vignette for the package. Please install from CRAN or Github. install.packages("SHAPforxgboost") # or devtools::install_github("liuyanguu/SHAPforxgboost") Why SHAP values SHAP’s main advantages are local explanation and consistency in global model…
Machine Learning
Study shrinkage and DART in xgboost modeling using a simple dataset
Yang Liu
/
2018-11-15
It is always a good idea to study the packaged algorithm with a simple example. Inspired by my colleague Kodi’s excellent work showing how xgboost handles missing values, I tried a simple 5x2 dataset to show how shrinkage and DART influence the growth of trees in the model. […] set.seed(123) n0 <- 5 X <- data.frame(x1 = runif(n0), x2 = runif(n0)) Y <- c(1, 5, 20, 50, 100) cbind(X,…
Machine Learning
SHAP Visualization in R (first post)
Yang Liu
/
2018-10-14
Update 19/07/21: Since my R Package SHAPforxgboost has been released on CRAN, I updated this post using the new functions and illustrate how to use these functions using two datasets. For more information, please refer to: SHAP visualization for XGBoost in R […] This is the example I used in the package SHAPforxgboost # Example use iris suppressPackageStartupMessages({…