SHARE
TWEET

Untitled

a guest Sep 13th, 2019 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. library(DALEXtra)
  2. library(ingredients)
  3. library(dplyr)
  4.  
  5.  
  6. dat <- xlsx::read.xlsx("CSRE-baza.xlsx", 1)
  7. colnames(dat) <- c("clay", "silt", "sand", "gravel", "cement", "moisture content", "dry density", "curing period", "compressive strength")
  8. tar <- dat[,ncol(dat)]
  9. dat <- dat[,-ncol(dat)]
  10. colnames(dat)
  11. dat <- dat %>% mutate(clay + silt)
  12. dat <- dat %>% select(-c("clay", "silt", "curing period", "dry density"))
  13.  
  14. colnames(dat)
  15. exp1 <- explain_scikitlearn("rfr.pkl", data = dat, y = tar,
  16.                             yml = system.file("extdata", "testing_environment.yml", package = "DALEXtra"))
  17.  
  18. plot(ingredients::feature_importance(exp1))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top