I run the xgboost model as follows:
bst <- xgb.train(data=dtrain, booster="gbtree", objective="reg:linear", max.depth=5, nround=20, watchlist=watchlist,min_child_weight=10) importance_matrix <- xgb.importance(names, model = bst) xgb.plot.importance(importance_matrix[1:10,])
The matrix with variable significance is drawn beautifully, but when I do
xgb.plot.tree(feature_names = names, model = bst, n_first_tree = 2)
RStudio opens a new browser window and displays a lot of HTML, but without an image. HTML has all the details, such as the scripts needed to create graphs, etc., but I donβt have these java scripts, and I thought that this should only work as building a matrix of importance.
What am I missing?
r plot xgboost
user3056186
source share