After successfully building XGBoost model on sparse.model.matrix(~.-1, data=train_set)
I get below error on the R console while attempting to plot feature importance matrix :
Error in readLines(filename_dump) : ‘con’ is not a connection
names_ <- train_matrix@Dimnames[]
xgb.importance(names_ , model=xg_mod)
If you had experienced this issue, how did you resolve it ? Is it because I had applied one hot encoding using ‘sparse.model.matrix’ ?