Devanik21 / ISRO_Mining_Site_FINAL_APP

5 stars 8 forks source link

Mismatch in Feature Names Between Classifier's Training and Prediction Phases #17

Open rakshit-upadhyay214 opened 19 hours ago

rakshit-upadhyay214 commented 19 hours ago

issue

While using the model for classification, a ValueError is raised due to a mismatch between the feature names used during the training phase (fit) and those passed during the inference phase (predict). The features passed at prediction time have inconsistent names compared to those seen during training.

Steps to Reproduce:

  1. Load the trained RF_mining_model.pkl .
  2. Attempt to make predictions using test data obtained from the original dataset's train-test split.
  3. Observe the ValueError due to mismatched feature names.

Expected Behavior: The feature names should match and remain consistent throughout.

Proposed Solution: Training classifier model against the exact feature names as they appear in the dataset.

github-actions[bot] commented 19 hours ago

👋 Thank you for raising an issue! We appreciate your effort in helping us improve. Our team will review it shortly. Stay tuned!

Devanik21 commented 11 hours ago

Can you specify which model is it ? GBoost or RForest

rakshit-upadhyay214 commented 9 hours ago

It was Random Forest.