Breast cancer is one of the leading causes of cancer-related deaths among women worldwide. Early diagnosis plays a crucial role in improving survival rates and treatment outcomes.
This project presents a Machine Learning-powered Breast Cancer Prediction System that predicts whether a breast tumor is Benign (Non-Cancerous) or Malignant (Cancerous) based on medical measurements.
The application provides a clean, responsive web interface where users can enter diagnostic values and receive an instant prediction generated by a trained Machine Learning model.
- π©Ί Predicts Breast Cancer using Machine Learning
- β‘ Instant Prediction
- π Responsive Flask Web Application
- π― High Prediction Accuracy
- π Uses 30 Medical Diagnostic Features
- π» User-Friendly Interface
- π Fast and Reliable Prediction
- π Clean Input Validation
- π Easy to Deploy
- π± Mobile Friendly
The following Machine Learning algorithms were evaluated during model development:
- Logistic Regression
- Support Vector Machine (SVM)
- Decision Tree
- K-Nearest Neighbors (KNN)
- Random Forest
- Gradient Boosting
After comparing their performance, Logistic Regression achieved the best overall results and was selected for deployment.
Dataset Name
Breast Cancer Wisconsin Diagnostic Dataset
The dataset consists of 30 numerical features computed from digitized images of breast fine needle aspirates (FNA).
The target variable contains:
- Benign (B)
- Malignant (M)
The application accepts the following medical parameters:
- Radius Mean
- Texture Mean
- Perimeter Mean
- Area Mean
- Smoothness Mean
- Compactness Mean
- Concavity Mean
- Concave Points Mean
- Symmetry Mean
- Fractal Dimension Mean
- Radius SE
- Texture SE
- Perimeter SE
- Area SE
- Smoothness SE
- Compactness SE
- Concavity SE
- Concave Points SE
- Symmetry SE
- Fractal Dimension SE
- Radius Worst
- Texture Worst
- Perimeter Worst
- Area Worst
- Smoothness Worst
- Compactness Worst
- Concavity Worst
- Concave Points Worst
- Symmetry Worst
- Fractal Dimension Worst
Breast Cancer Dataset
β
βΌ
Data Preprocessing
β
βΌ
Data Cleaning & Scaling
β
βΌ
Train-Test Data Splitting
β
βΌ
Machine Learning Model Training
β
βΌ
Model Performance Evaluation
β
βΌ
Best Model Selection
β
βΌ
Save Trained Model (.pkl)
β
βΌ
Flask Web Application
β
βΌ
User Input Features
β
βΌ
Breast Cancer Prediction
- Python
- Scikit-Learn
- NumPy
- Pandas
- Matplotlib
- Seaborn
- Flask
- HTML5
- CSS3
- Bootstrap
- JavaScript
- Jupyter Notebook
- VS Code
- Git
- GitHub
Breast-Cancer-Prediction/
β
βββ static/
β βββ css/
β βββ js/
β βββ images/
β
βββ templates/
β βββ index.html
β βββ result.html
β
βββ model/
β βββ breast_cancer_model.pkl
β βββ scaler.pkl
β
βββ notebook/
β βββ model_training.ipynb
β
βββ dataset/
β βββ data.csv
β
βββ app.py
βββ requirements.txt
βββ README.md
βββ LICENSE
git clone https://github.com/your-username/Breast-Cancer-Prediction.gitMove into the project
cd Breast-Cancer-PredictionInstall dependencies
pip install -r requirements.txtRun Flask Application
python app.pyOpen your browser
http://127.0.0.1:5000
The trained model was evaluated using multiple classification metrics.
- Accuracy
- Precision
- Recall
- F1 Score
- ROC-AUC Score
- Confusion Matrix
π Logistic Regression
- Deep Learning Model
- Medical Image Classification
- Explainable AI (SHAP/LIME)
- Cloud Deployment
- REST API
- Mobile Application
- Doctor Dashboard
- Patient History Tracking
- Authentication System
- PDF Medical Report Generation
- Detect breast cancer at an early stage.
- Assist healthcare professionals.
- Reduce diagnosis time.
- Improve prediction accuracy.
- Demonstrate Machine Learning in Healthcare.
- Build an interactive prediction system.
β Machine Learning Powered
β Responsive Web Application
β Instant Prediction
β Easy-to-use Interface
β Fast Performance
β Healthcare-based AI Solution
β Deployment Ready
Flask
numpy
pandas
scikit-learn
matplotlib
seaborn
joblib
Install all packages
pip install -r requirements.txtB.Tech - Computer Science & Engineering
Machine Learning Enthusiast | Python Developer | AI & Data Science
GitHub: https://github.com/rajrohit-49
LinkedIn: https:www.linkedin.com/in/rohitk-cse
This project is licensed under the MIT License.
If you found this project helpful,
β Star this repository
π΄ Fork this repository
π Contribute to improve it
Special thanks to the open-source community and the creators of the Breast Cancer Wisconsin Diagnostic Dataset, Scikit-Learn, and Flask for making this project possible.
This project demonstrates how Machine Learning can assist in the early prediction of breast cancer, providing quick, reliable, and intelligent predictions through an elegant web application.
"Early Detection Saves Lives."


