Devanik21 / ISRO_Mining_Site_FINAL_APP

MIT License
11 stars 39 forks source link

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

Open rakshit-upadhyay214 opened 1 month ago

rakshit-upadhyay214 commented 1 month 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 1 month 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 1 month ago

Can you specify which model is it ? GBoost or RForest

rakshit-upadhyay214 commented 1 month ago

It was Random Forest.

saumyacoder1709 commented 4 weeks ago

I want to work on this issue