Skip to content

A simple machine learning project comparing a manual K-Nearest Neighbors (KNN) implementation with Scikit-learn’s KNN classifier on breast cancer diagnosis data.

License

Notifications You must be signed in to change notification settings

Mohammed-asaad-AI/Breast-Cancer-KNN-Comparison

Repository files navigation

🧠 Breast Cancer Diagnosis using KNN

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.


📦 Features Used

  • Tumor features: radius, texture, perimeter, area, etc.
  • Binary labels: Malignant (1) or Benign (0)

🔍 Results

Model Accuracy
Manual KNN ~91.2%
Sklearn KNN ~95.6%

📊 A visual comparison is provided in the final plot.


▶️ How to Run

# 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

🧑‍💻 Author

Mohammed Asaad
📧 mo.asaad999@gmail.com
🔗 LinkedIn


⚖️ License

This project is licensed under the MIT License.

About

A simple machine learning project comparing a manual K-Nearest Neighbors (KNN) implementation with Scikit-learn’s KNN classifier on breast cancer diagnosis data.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published