I am using XGBoost with Python and have successfully trained the model using an XGBoost function train()called data DMatrix. The matrix was created from the Pandas frame, which has function names for the columns.
Xtrain, Xval, ytrain, yval = train_test_split(df[feature_names], y, \
test_size=0.2, random_state=42)
dtrain = xgb.DMatrix(Xtrain, label=ytrain)
model = xgb.train(xgb_params, dtrain, num_boost_round=60, \
early_stopping_rounds=50, maximize=False, verbose_eval=10)
fig, ax = plt.subplots(1,1,figsize=(10,10))
xgb.plot_importance(model, max_num_features=5, ax=ax)
Now I want to see the importance of the function with the function xgboost.plot_importance(), but as a result of this graph, the names of the functions are not displayed. Instead, the functions are listed as f1, f2, f3, etc., as shown below.

I think the problem is that I converted the original Pandas data frame to DMatrix. How can I relate the names of objects so that they are displayed in a graph of the importance of the function?