I have trained an XGBoostRegressor model. When I have to use this trained model for predicting for a new input, the predict() function throws a feature_names mismatch error,
I also had this problem when i used pandas DataFrame (non-sparse representation).
I converted training and testing data into numpy ndarray.
numpy ndarray
`X_train = X_train.as_matrix() X_test = X_test.as_matrix()`
This how i got rid of that Error!