A simple machine learning comparison project between:
- ✅ Manual K-Nearest Neighbors implementation
- ✅ Scikit-learn’s KNeighborsClassifier
Both models are tested on breast cancer diagnostic data and compared using accuracy and visualization.
- Tumor features: radius, texture, perimeter, area, etc.
- Binary labels:
Malignant (1)
orBenign (0)
Model | Accuracy |
---|---|
Manual KNN | ~91.2% |
Sklearn KNN | ~95.6% |
📊 A visual comparison is provided in the final plot.
# Clone the repo
git clone https://github.com/yourusername/Breast-Cancer-KNN-Comparison.git
cd Breast-Cancer-KNN-Comparison
# Install dependencies
pip install -r requirements.txt
# Run the model
python breast_cancer_knn.py
Mohammed Asaad
📧 mo.asaad999@gmail.com
🔗 LinkedIn
This project is licensed under the MIT License.