I trained XGBoost model using python, but when I deployed the model,
it shows number of feature is not equal between trained model and prediction value.
The strange thing is that the type of feature is same for the value used for model training and the value used for prediction.
I am using multidimensional vectors as feature values, and the types are as follows.
- Feature Type in training model
>> len(feature_train) 768 >> type(feature_train) numpy.ndarray >> type(feature_train) numpy.float64
- Feature Type in prediction
>> len(feature_predict) 768 >> type(feature_predict) <class 'numpy.ndarray'> >> type(feature_predict) <class 'numpy.float64'>
- Error Message
num_feature (1 vs. 768) : Number of columns in data must equal to trained model.
Can someone please tell me the solution?