Skip to content

Breast cancer prediction🎗️using logistic regression, random forest and artificial neural network

License

Notifications You must be signed in to change notification settings

iamdhrutipatel/BreasTest

Repository files navigation

BreasTest - Breast Cancer Prediction🎗️

This repository contains 2 colab files 🗂️ that trains the model to predict whether it is a Malignant diagnosis or Benign diagnosis by using the supervised machine learning techniques and neural network techniques. This uses 3 different algorithms of Machine Learning:

  1. Logistic Regression
  2. Random Forest
  3. Artifical Neural Network

Explanation of the Project

  • First, I've trained my model with artifical neural network to predict, if it is a benign diagnosis or malignant diagnosis. In that learned so many things like how to deal with missing values or categorical values, etc.

  • Second, I've trained the model with logstic regression and random forest algorithms. Also, have done randomized search to find the best parameters to train the model.

  • The Dataset I've used to train my models is here.

  • To find artifical neural network trained model follow this link.

  • To find logistic regression and random forest trained model follow this link.

Libraries Used

Libraries used in this project are as follows:

  • numpy
  • pandas
  • seaborn
  • matplotlib
  • sklearn

Installation Setup

1. Clone the repository

You can clone this repository using command: https://github.com/iamdhrutipatel/BreasTest.git

2. Open Breast_Cancer_Prediction_ANN.ipynb, Breast_Cancer_Prediction_LR_RF.ipynb

You can open the .ipynb file using Google Collab or Jupyter Notebook.
Don't have Jupyter Notebook? Don't worry, run the following commands and you're good to go 🚀

$ pip install notebook
$ jupyter notebook

3. Execute all the cells consecutively to see the accurecy of all model and the graphical reprentaion of the data.

4. After firing the queries, at the end of all the algorithms we will be able to predict if the diagnosis is malignant or benign.

Results

Algorithm Accuracy
Logistic Regression 96.49%
Random Forest 96.49%
Artifical Neural Network 98.36%
Final Logistic Regression 95.56%

Final Logistic Regression is the model which I've trained after finding the best parameters to train the model.

Facing any issues???

Feel free to open an issue. I'll be glad to help you.❤️