assuming that you're using xgboost to fit boosted treesfor binary classification. The importance matrix is actually a data.tableobject with the first column listing the names of all the features actuallyused in the boosted trees.
The meaning of the importance data table is as follows:
- The Gain implies the relative contribution of the corresponding feature to the model calculated by taking each feature's contribution for each tree in the model. A higher value of this metric when compared to another feature implies it is more important for generating a prediction.
- The Cover metric means the relative number of observations related to this feature. For example, if you have 100 observations, 4 features and 3 trees, and suppose feature1 is used to decide the leaf node for 10, 5, and