Authors

XgBoost Predicting Covid19 Mortality: React/Flask WebApp

Goal

Our Goal was predicting the mortality rate of Covid19 patients on an individual basis with a xgBoost Model. Predictors such as Age, Country, Symptoms were used. This should be only a showcase app. We have no medical expertise and wanted to test how well it is possible to predict the mortality rate with machine learning algorithms.

We used the dataset from kaggle: Novel Corona Virus 2019 Dataset

Challenges

The main challenge was finding an useful dataset with individual datapoints for Covid19 patients. The dataset we found was not cleaned and had many Null-Values. For better accuracy and generalisation of the model we absolutely need more individual datapoints of Covid19 patients. We worked with ~1100 datapoints from which most were recorded in China. Using this dataset and model for predicting the mortality risk of an patient in the current pandemic state would me most likely *meaningless.

Implementation and Results

We cleaned the dataset and trained an model with xgBoost in Python.  We tried to visualize a few important information. After training and validating the model (94% accuracy on predicting the mortality rate in the dataset and 80% accuracy on predicting the recovery) we exported the model with the help of the package pickle.

After exporting the model we created a Flask API which serves the predictions as JSON output. The react-js frontend website with forms sends the requests to the Flask API after pressing the submit button. The Flask API predicts the probability and serves the response to the react frontend. (For more information and implementation visit the github repository).

Try It out

Hackathons

Technologies

flask, javascript, machine-learning, python, react

Devpost Software Identifier

257080