Inspiration
Coronary disorder is one of the most common health related issues suffered by individuals belonging to various age groups (generally above 30 years). It is easier to treat when detected early. Our web application focuses to help people know whether they have any risk of coronary disorder or not, based on various parameters like Age, Sex, Cholesterol, Maximum Heart Rate, Smoker or Non-Smoker and more.
What it does
The various risk factors for developing coronary disease are Age, Sex, Smoking, High Blood Pressure, High Cholesterol Levels, High Heart rate, Exercise induced angina, Thalassemia and more. Cardiovascular Disorder Predictor takes these parameters as input from the user and predicts if he/she has a risk of heart disorder. After entering all the details, clicking on Show Input Data button at the bottom will display the summary of the data entered by the user. The user can then cross-check the data and if there is any mistake, he/she can edit the details and the data will be updated automatically. Then clicking on the Show Test Results button will show the predicted result to the user.
How we built it
The application is built using Python. The various Python libraries used are Numpy, Pandas, Matplotlib, Seaborn, Scikit-learn and Streamlit. To build the model, Google Colaboratory is used. After reading the data and pre-processing, I tried out different classification models along with hyper-parameter tuning. The Acuracy Scores of the different classification models are as follows:
- Accuracy Score of Random Forest Classifier Model is 82.42%
- Accuracy Score of Logistic Regression Model is 83.52%
- Accuracy Score of KNN Classifier Model is 86.81%
- Accuracy Score of SVM Classifier Model is 82.42%
- Accuracy Score of Decision Tree Classifier Model is 78.02%**
The best Accuracy Score is achieved by using K-Nearest Neighbors Algorithm with n_neighbors = 6. The Accuracy achieved is around 87%. So, I have used that model in the web application. The interface of the app is built using Streamlit.
Challenges we ran into
There are multiple challenges that I faced while developing and deploying this web application. First challenge was to select and use the correct hyper-parameters to get maximum accuracy. Secondly, this is the first time that I am using Streamlit to make ML Web app. So, it was challenging to make the web application up and running. Third challenge was deploying the application to Heroku. I repeatedly got a lot of errors at first like Build Failure, Application Error which took me a lot of time to fix. Ultimately, the web app was successfully deployed.
Accomplishments that we're proud of
I overcame all the challenges and successfully deployed this application. The app works exactly as planned.
What we learned
Firstly, I learnt to use this awesome Python library Streamlit for developing web apps. Next, I got to know a lot about Heroku deployment by studying the logs when I was getting the error. I also revisited my Statistics concepts and the ML Algorithms while making the model and doing hyper-parameter optimization.
What's next for Cardiovascular Disorder Predictor
Next, my main objective is to use advanced ensemble techniques to improve the accuracy score of the model.
Built With
- matplotlib
- numpy
- pandas
- python
- scikit-learn
- seaborn
- streamlit
Log in or sign up for Devpost to join the conversation.