This Project use Logistic Regression to calculate Probability of a person having CoViD-19 so as to prioritize the testing such that those who have high probability of getting infected could be tested before those who have relatively less probability of getting infected. User will be asked for conditions like Travel Status, Fever Level, Body Pain, Runny Nose etc and according to that data the model will predict the probability of having infected.
-
Open command prompt or powershell window.
-
Type this command
git clone https://github.com/YashasviBhatt/CoViD-19_Probability_Detector
and press enter. -
Go inside the Cloned Repository folder and open command-prompt or powershell window.
-
Type
pip install -r requirements.txt
and press enter in either command_prompt or powershell window as administrator. -
After Installing all the required libraries create the server using
python srvr.py
.
Open the IP Address in a browser and use this Project. -
srvr.py
uses the saved model which was pre-trained and kept saved, if you want to retrain the model then executepython covid_prob.py
now repeat step 5.
- Firstly, data is imported using
pandas library
. - Secondly, we divide the features and label into seperate dataframes.
- Now, after creating the separate dataframes for features and label, we split them into training and testing sets.
- The training set is used to train the model using Logistic Regression (since, we are talking about probability and Tabular Datasets, thus Logistic Regression best fits the approach).
- The trained model is saved into a file using
pickle
module in python. srvr.py
file is used to create a localhost server usingflask
module in python which will reflect the HTML pages.- The data after submitting the form from HTML pages is passed to trained model which will later calculate Probability.
This Model is completely trained on random data, thus accuracy should not be taken in concern, however if real stats is used for training, this Model can perform much-much better.