Code Monkey home page Code Monkey logo

ml-ds-covid's Introduction

Covid-19 Patient Fatality Risk Classification Prediction Web App

Description

This web app uses machine learning to classify Covid-19 patients as low risk or high risk for fatality based on patients' epidemiological parameters. Using machine learning to automate risk assessment could hypothetically help hospitals process and treat patients more efficiently, maximize utilization of limited resources, and improve patient outcome.

A Jupyter Notebook is used as the machine learning environment. The data source is Covid-19 patient data from Korea’s CDC and local governments (https://www.kaggle.com/kimjihoo/coronavirusdataset). After the dataset is cleaned and transformed with pandas, it is used to train a classification prediction model with Scikit-learn. After the prediction model is optimized, it is exported as a pickle file so it can be used in the back-end of the web app.

User input is entered in the front-end of the web app and passed to the back-end with Flask. In the back-end, the prediction model takes user input and outputs predictions. The output is passed back to the front-end with a Flask templating engine called jinja.

There are also graphs and charts created with pandas, Matplotlib, and seaborn that visually summarize Korea’s Covid-19 patient data and data analysis.

Web app form

Demo

This site may take a while to load because it is hosted on Heroku's free plan and therefore gets unloaded from Heroku's server memory if there is no web traffic for a certain period.

https://covid-19-fatality-predictor.herokuapp.com/

Tech Stack

  • HTML / CSS
  • Python
  • Flask
  • Jupyter Notebook

Setup

Install Python 3 with the official installer (recommended).
https://www.python.org/downloads/

Or install using Homebrew package manager (macOS only).

brew update && brew upgrade
brew install python3

Install miniconda3 package from official website to use conda.
https://docs.conda.io/en/latest/miniconda.html

Move to project directory

cd ml-ds-js

Create a virtual environment

# If using venv:
python3 -m venv env

# If using conda:
conda create --prefix ./env

Activate virtual environment

# If using venv:
source env/bin/activate

# If using conda:
conda env list # See list of environments
conda activate /<filepath>/env

Install dependencies

# If using venv:
pip install -r requirements.txt

# If using conda:
conda install pip
which pip # Make sure it is environment pip, not global pip
pip install -r requirements.txt

Setup web app

Start server

python3 app.py

Stop server

ctrl + c

Setup Jupyter Notebook

Start server

jupyter notebook

Stop server

ctrl + c

ml-ds-covid's People

Contributors

dependabot[bot] avatar eunicode avatar

Stargazers

 avatar

Watchers

 avatar  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.