Home > Software engineering >  Correspondence between feature names and dumped model in XGBoost
Correspondence between feature names and dumped model in XGBoost

Time:02-10

I trained a model using XGBoost and I am trying to dumpe said model to a human readable fiele. However, in the text file generated by the dump_model method, the original name of the features is replaced by f0, f1, f2, etc. Looking a bit more closely in the documentation, it is mentioned here that there is an argument called fmap, that I thought at first would create a file with the correspondence between f0, f1, f2, ..., and the original feature names. Nonethless, according to this discussion, fmap is an input and not an output. How can one get the correspondence with the original feature names? Does XGBoost use feature inportance to order the features (as in f0 is the most important feature, f1 is the second more importat, and so on), or is a different order utilised? I could not find any information on this.

CodePudding user response:

  •  Tags:  
  • Related