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 came across the same problem and it's been solved by adding passing the train dataframe column name to the test dataframe via adding the following code: