XGBoost feature importance has all features but decision tree doesn't I have used XGBoost to train a model with 400 features. My understanding is that since the max_depth is default at only 6, and 2^6 &lt; 400, not all features will end up in the tree.
How come when I output the feature importance chart, it shows every single feature with above 0 importance? The decision tree output clearly shows that not every feature has been used in the final tree.
XGBoost iteratively trains many trees (=boosting). So there is not only one tree.
For example you can plot a single tree, see: https://machinelearningmastery.com/visualize-gradient-boosting-decision-trees-xgboost-python/
A basic decision tree algorithm creates just one tree. If you apply pruning to the tree not all features would be present in the tree. The first split would be the one with the highest importance, ...