This project evaluates supervised classification models using standard performance metrics and imbalance-aware modeling techniques. The objective is to train classification models, measure their predictive quality, compare model behavior, and document the evaluation workflow clearly enough for review or submission.
The classification problem solved is binary tumor diagnosis using the Breast Cancer Wisconsin diagnostic dataset from scikit-learn. The target labels represent malignant and benign tumor classes, and the features describe computed characteristics of cell nuclei from digitized biopsy images.
Algorithms implemented:
- Logistic Regression
- Logistic Regression with class weighting for imbalance handling
- Decision Tree Classifier for comparison
- Python
- Pandas
- NumPy
- Scikit-Learn
- Matplotlib
- Data Loading
- Train-Test Split
- Feature Scaling
- Logistic Regression
- Confusion Matrix
- Classification Report
- ROC Curve & AUC
- Class Imbalance Handling
- Decision Tree Comparison
The following metrics were extracted from the notebook outputs and reproduced from the same workflow:
| Model | Accuracy | Precision | Recall | F1 Score | ROC-AUC Score |
|---|---|---|---|---|---|
| Logistic Regression | 0.9825 | 0.9825 | 0.9825 | 0.9825 | 0.9954 |
| Decision Tree | 0.9123 | 0.9161 | 0.9123 | 0.9130 | Not evaluated |
Logistic Regression confusion matrix:
[[41, 1],
[ 1, 71]]
Visual evaluation outputs:
images/confusion_matrix.pngimages/roc_curve.png
AI_ML_Task4_Classification/
├── notebook/
│ └── AI_ML_Task4_Classification_Evaluation.ipynb
├── report/
│ └── Task4_Report.pdf
├── images/
│ ├── roc_curve.png
│ └── confusion_matrix.png
├── README.md
├── requirements.txt
└── .gitignore
Install the required dependencies:
pip install -r requirements.txtOpen and execute the notebook:
jupyter notebook notebook/AI_ML_Task4_Classification_Evaluation.ipynbRun the cells from top to bottom to load the dataset, train the models, generate evaluation metrics, and display the confusion matrix and ROC curve.
Logistic Regression is the selected final model because it achieved stronger overall performance than the Decision Tree baseline. It reached 98.25% accuracy, weighted precision/recall/F1 of 98.25%, and a ROC-AUC score of 0.9954, indicating excellent class separation on the test set.