Coder Social home page Coder Social logo

miretteamin / breast-cancer-predictor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from srimani-programmer/breast-cancer-predictor

0.0 0.0 0.0 172.53 MB

A Flask based web application to predict breast cancer.

License: GNU General Public License v3.0

Python 100.00%

breast-cancer-predictor's Introduction

Breast Cancer Prediction

Predicts whether the type of breast cancer is Malignant or Benign

Issues Pull Requests Forks Stars License

Please follow the Code of Conduct: Code of Conduct

Aim of the Project

> To predict if a breast cancer is Malignant or Benign using Image Dataset as well as Numerical Data

> Apply ML and DL Models to predict the severity of the Breast-Cancer

> Create a Wonderful UI for this project using Front End Languages and Frameworks (Like Bootstrap)

> Create the Backend using Flask Framework.

> Deploy on Cloud and make this wonderful project available to public

Note: Kindly do not push any changes to Main or Master Branch. A New Branch named "New_Pipeline" is already created and push all the changes to this branch

Don't forget to create an issue before making a PR

๐Ÿ‘‰ Repo Link : https://github.com/srimani-programmer/Breast-Cancer-Predictor/

Table of contents

About Project:

Breast cancer is the most common type of cancer in women. When cancers are found early, they can often be cured. Some devices detect breast cancer but many times they lead to false positives, which results in patients undergoing painful, expensive surgeries that were not even necessary. These type of cancers are called benign which do not require surgeries and we can reduce these unnecessary surgeries by using Machine Learning. I have taken the dataset of the previous breast cancer patients and train the model to predict whether the cancer is benign or malignant. These predictions will help doctors to do surgeries only when the cancer is malignant, thus reducing the unnecessary surgeries for women.

For building the project I have used Wisconsin Breast cancer data which has 569 rows of which 357 are benign and 212 are malignant. The data is prepossessed and scaled. I have trained with Random forest Classifier gives the best accuracy of 95.0%. To provide an easy-to-use interface to doctors I have developed a website that will take the data and display the output with accuracy and time taken to predict.

Languages or Frameworks Used

  • Python: language
  • NumPy: library for numerical calculations
  • Pandas: library for data manipulation and analysis
  • SkLearn: library which features various classification, regression and clustering algorithms
  • Flask: microframework for building web applications using Python.

Project Setup

  • First Clone the repository.
  • Create the virtual environment for the project.
$ conda create -n myenv python=3.6
  • Install the required packages using requirements.txt inside the environemnt using pip.
$ pip install -r requirements.txt
  • run the app.py as python app.py
  • Web Application will be hosted at 127.0.0.1:5000
  • Enter the URL in the browser Application will be hosted.
  • Enter the details of the tumor to detect the type of the cancer with more than 95% accuracy.

Steps to follow ๐Ÿ“œ

0. Star The Repo ๐ŸŒŸ

Star the repo by pressing the topmost-right button to start your wonderful journey.

1. Fork it ๐Ÿด

2. Clone it ๐Ÿ‘ฅ

NOTE: commands are to be executed on Linux, Mac, and Windows

You need to clone (download) it to local machine using

$ git clone https://github.com/Your_Username/Breast-Cancer-Predictor.git

This makes a local copy of the repository in your machine.

Once you have cloned the `Breast-Cancer-Predictor' repository in Github, move to that folder first using change directory command on Linux, Mac, and Windows

# This will change directory to a folder Hacktoberfest_20
$ cd Breast-Cancer-Predictor

Move to this folder for all other commands.

3. Set it up โฌ†๏ธ

Run the following commands to see that your local copy has a reference to your forked remote repository in Github :octocat:

$ git remote -v
origin  https://github.com/Your_Username/Breast-Cancer-Predictor.git (fetch)
origin  https://github.com/Your_Username/Breast-Cancer-Predictor.git (push)

Now, let's add a reference to the original Breast-Cancer-Predictor repository using

$ git remote add upstream https://github.com/srimani-programmer/Breast-Cancer-Predictor.git

This adds a new remote named upstream.

See the changes using

$ git remote -v
origin    https://github.com/Your_Username/Breast-Cancer-Predictor.git (fetch)
origin    https://github.com/Your_Username/Breast-Cancer-Predictor.git (push)
upstream  https://github.com/Remote_Username/Breast-Cancer-Predictor.git (fetch)
upstream  https://github.com/Remote_Username/Breast-Cancer-Predictor.git (push)

In your case, you will see

$ git remote -V
origin    https://github.com/Your_Username/Breast-Cancer-Predictor.git (fetch)
origin    https://github.com/Your_Username/Breast-Cancer-Predictor.git (push)
upstream  https://github.com/manan-bedi2908/Breast-Cancer-Predictor.git (fetch)
upstream  https://github.com/manan-bedi2908/Breast-Cancer-Predictor.git (push)

4. Sync it โ™ป๏ธ

Always keep your local copy of the repository updated with the original repository. Before making any changes and/or in an appropriate interval, run the following commands carefully to update your local repository.

# Fetch all remote repositories and delete any deleted remote branches
$ git fetch --all --prune

# Switch to `New_Pipeline` branch
$ git checkout New_Pipeline

# Reset local `main` branch to match the `upstream` repository's `main` branch
$ git reset --hard upstream/main

# Push changes to your forked `Breast-Cancer-Predictor` repo
$ git push -u origin New_Pipeline

5. Ready Steady Go... ๐Ÿข ๐Ÿ‡

Once you have completed these steps, you are ready to start contributing to the project and creating pull requests.

6. Checkout to a new branch โ€ผ๏ธ

Whenever you are going to contribute. Please create a separate branch using command and keep your main branch clean (i.e. synced with remote branch).

# It will create a new branch with name Branch_Name and switch to branch Folder_Name
$ git checkout -b New_Pipeline

Create a separate branch for contribution and try to use the same name of the branch as of folder.

To switch to the desired branch

# To switch from one folder to other
$ git checkout New_Pipeline

To add the changes to the branch. Use

# To add all files to branch Folder_Name
$ git add .

Type in a message relevant for the code reviewer using

# This message get associated with all files you have changed
$ git commit -m 'relevant message'

Now, Push your awesome work to your remote repository using

# To push your work to your remote repository
$ git push -u origin New_Pipeline

(Kindly push all the changes to the "New_Pipeline", not main branch) Finally, go to your repository in the browser and click on compare and pull requests. Then add a title and description to your pull request that explains your precious effort.


Application UI

Home Page

Home Page 1


Tumor Data form

Home Page 2


Tumor Data form

Home Page 3


Prediction Output

Prediction Page

Awesome contributors ๐Ÿคฉ

Made with contributors-img.

breast-cancer-predictor's People

Contributors

srimani-programmer avatar manan-bedi2908 avatar amandp13 avatar aditi1403 avatar arpit456jain avatar akrish4 avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.