This project builds a binary classification model to predict whether a mushroom is edible or poisonous based on its physical characteristics. It demonstrates how to handle datasets that consist entirely of categorical text data.
- Categorical Data Cleaning: Identified and imputed hidden missing values (represented by
?) using statistical mode. - One-Hot Encoding: Converted 22 columns of purely textual data (e.g., cap shape, odor, gill color) into a machine-readable numeric matrix using Pandas.
- Binary Classification: Trained a Logistic Regression model to distinguish between two distinct classes (Edible vs. Poisonous).
- Evaluation Metrics: Evaluated model safety and performance using Accuracy and a Confusion Matrix, specifically optimizing to eliminate False Negatives (predicting a poisonous mushroom is safe).
The model achieved perfect classification on unseen test data, successfully identifying the mathematical rules that determine a mushroom's toxicity (e.g., foul odors):
- Accuracy: 100.00%
- False Negatives (Fatal Errors): 0
- Python, Pandas, Scikit-Learn