Skip to content

Instantly share code, notes, and snippets.

@sriyoda
Created March 30, 2016 15:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sriyoda/648efc4357387344c1823119b0215fad to your computer and use it in GitHub Desktop.
Save sriyoda/648efc4357387344c1823119b0215fad to your computer and use it in GitHub Desktop.
# feature importance plot
xgb.plot.importance(importance_matrix[1:10,])
bst <- xgb.train(data=dtrain, max.depth=5.5, eta=.02, nthread = 2, nround=5, watchlist=watchlist, objective = "binary:logistic")
xgb.dump(bst, with.stats = T)
xgb.plot.tree(model = bst)
importance_matrix <- xgb.importance(model = bst)
xgb.plot.importance(importance_matrix = importance_matrix)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment