<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 XGBoost Model Analysis
This notebook can be used to load and analysis model learnt from all xgboost bindings, including distributed training.
Step1:  Please change the pkg_path and model_file to be correct path
Step2:  Plot the Feature Importance
Step3:  Plot the First Tree
<ASSISTANT_TASK:>
Python Code:
import sys
import os
%matplotlib inline 
Explanation: XGBoost Model Analysis
This notebook can be used to load and analysis model learnt from all xgboost bindings, including distributed training.
End of explanation
pkg_path = '../../python-package/'
model_file = 's3://my-bucket/xgb-demo/model/0002.model'
sys.path.insert(0, pkg_path)
import xgboost as xgb
Explanation: Please change the pkg_path and model_file to be correct path
End of explanation
# plot the first two trees.
bst = xgb.Booster(model_file=model_file)
xgb.plot_importance(bst)
Explanation: Plot the Feature Importance
End of explanation
tree_id = 0
xgb.to_graphviz(bst, tree_id)
Explanation: Plot the First Tree
End of explanation
<END_TASK>