Breast Cancer Prediction Using Machine Learning is a Flask-based healthcare prediction application that classifies breast tumors as benign or malignant using 30 medical features. The project compares multiple machine learning algorithms, evaluates their performance using accuracy, precision, recall and F1-score, selects the best-performing model, and provides a web interface for real-time predictions.
Breast Cancer Prediction Using Machine Learning is a Python-based machine learning project designed to classify breast tumors as benign or malignant. The application uses the Breast Cancer Wisconsin Diagnostic Dataset and analyzes 30 medical features related to tumor characteristics.
The project demonstrates the complete machine learning workflow, including data preprocessing, feature transformation, model training, model evaluation, best-model selection and real-time prediction through a Flask web application.
The project uses the Breast Cancer Wisconsin Diagnostic Dataset available through the scikit-learn ecosystem. The classification problem contains 30 medical features and two prediction classes: benign and malignant.
The features include measurements related to tumor radius, texture, perimeter, area, smoothness, compactness, symmetry, fractal dimension and corresponding standard-error and worst-value measurements.
Multiple classification algorithms are trained and evaluated to identify the best-performing model for deployment.
The project evaluates the trained models using accuracy, precision, recall and F1-score before selecting the best-performing model for final predictions.
The data preprocessing pipeline loads and cleans the dataset, handles missing values, encodes categorical information, scales numerical features and performs the required feature transformations before model training.
The training pipeline prepares the dataset, performs preprocessing, trains multiple classification models, evaluates their performance and stores the selected best-performing model for later prediction.
The prediction pipeline loads the trained model and applies the same required transformations to user-provided medical parameters. The processed input is then passed to the selected model to generate a benign or malignant prediction.
The project includes a Flask-based web interface where users can enter the required medical parameters. The application processes the submitted values through the prediction pipeline and displays the resulting tumor classification.
Model performance is evaluated using multiple classification metrics. Accuracy measures overall correct predictions, while precision, recall and F1-score provide additional insight into classification performance.
The trained model and processed datasets are stored as project artifacts. The selected model is saved in pickle format so that it can be loaded by the prediction pipeline without retraining the complete system for every prediction.
The project includes Jupyter Notebook resources for data exploration, visualization and model training experiments. These notebooks help understand the dataset and evaluate different machine learning approaches before deployment.
The application includes logging functionality for tracking project execution and model pipeline activities. A custom exception component is also included to make errors easier to identify and debug.
This project is an educational machine learning application based on the Breast Cancer Wisconsin Diagnostic Dataset. Its predictions should not be treated as a medical diagnosis or a replacement for professional medical evaluation.
Watch Breast Cancer Prediction Using Machine Learning Demo
View Breast Cancer Prediction Using Machine Learning Details
1. Install Python and Visual Studio Code. 2. Extract the project ZIP file. 3. Open the project folder in Visual Studio Code. 4. Open the VS Code terminal. 5. Create a virtual environment using: python -m venv venv 6. Activate the virtual environment on Windows using: venv\Scripts\activate 7. Install the required packages using: pip install -r requirements.txt 8. Verify that the required dataset and project artifacts are available. 9. Open the project configuration if any environment settings are required. 10. Run the training pipeline if the trained model is not already available. 11. Ensure that the trained model artifact is generated successfully. 12. Start the Flask application using: python application.py 13. Open the local Flask address displayed in the terminal. 14. Enter the required medical parameters in the prediction form. 15. Submit the form to generate the tumor classification result. 16. Use the Jupyter Notebook files for data exploration and model experimentation. 17. Do not use the prediction result as a medical diagnosis.
FAQ for this project coming soon.
No reviews yet. Be the first to review!