In [ ]:
import sys
import os
%matplotlib inline
In [ ]:
pkg_path = '../../python-package/'
model_file = 's3://my-bucket/xgb-demo/model/0002.model'
sys.path.insert(0, pkg_path)
import xgboost as xgb
In [ ]:
# plot the first two trees.
bst = xgb.Booster(model_file=model_file)
xgb.plot_importance(bst)
In [ ]:
tree_id = 0
xgb.to_graphviz(bst, tree_id)