data(agaricus.train, package='xgboost')
bst <- xgboost(data = agaricus.train$data, label = agaricus.train$label, max_depth = 2,
eta = 1, nthread = 2, nrounds = 2,objective = "binary:logistic")
xgb.plot.tree(feature_names = colnames(agaricus.train$data), model = bst)
Run the code above in your browser using DataLab