Inspiration
As a very personal project for all of our team members, we have worked hard in developing a realistic solution for the elderly members of our society along with the rural sections of India. With personal experience and understanding how our own grandparents struggle with technology, we approached the project while keeping this in mind and understanding the actual needs of those who face technical difficulties.
What it does
A result of the RedBricks Hackathon 2022, this project aims to assist the elderly with their preliminary diagnosis and factors affecting Heart Diseases, Diabetes, Common Illnesses and Mental Illness through a simplistic, intuitive and easy to comprehend UI. Furthermore, it also helps the rural population in recognizing illnesses that might turn fatal if ignored or untreated and reach the nearest doctor in emergencies. In such a way, the program guides those who don't have sufficient facilities for a checkup. Primarily, our intention is to help the users in case of any emergency or help them recognize these illnesses as a preemptive measure to fight it. We accomplish this through a comprehensive yet simple questionnaire along with a straightforward chatbot trained with thousands of entries from official databases.
Our Code aims to solve 4 main problems and provides the perfect streamlit interface for that:
1)Using an AI Trained Chatbot to converse with elderly patients and diagnose illnesses through symptoms provided 2)Used a dataset of the risk factors to accurately build a webapp that can predict the probability of an individual getting heart disease 3)Building a machine learning model to accurately build a webapp that can predict the probability of an individual getting diabetes 4)Building a machine learning model using logistic regression that can predict the probability of an individual being susceptible to mental health problems.
How we built it
Databases used BRFSS completes more than 400,000 adult interviews each year, making it the largest continuously conducted health survey system in the world. https://www.kaggle.com/datasets/cdc/behavioral-risk-factor-surveillance-system The Princeton University's Health Services center provided us with data used to train the chatbot and allow it to be an efficient and easy-to-use chatbot for the elderly. https://uhs.princeton.edu/health-resources/common-illnesses https://data-flair.training/blogs/python-chatbot-project/ The data collected by the state helps diagnosing the user with verified and authentic previously obtained data. https://www.kaggle.com/code/kairosart/machine-learning-for-mental-health-1/data?select=survey.csv
Cleaning the Dataset The BRFSS Dataset initially had 441456 rows and 330 columns Shortlisted 22 columns most suited for heart diseases Dropped missing values. 97850 rows removed. Changing previously Ordinal variable to Categorical variable (Binary yes-no) Making ordering of Ordinal variable to become more precise by removing the unwanted statistical data Final 21 variables listed as Blood pressure, cholesterol, how recent is cholesterol check, BMI, smoke activity, stroke, diabetes, physical activity frequency, eat fruits, eat veggies, amount of alcohol consumption, registered healthcare insurance, financial problems for medical visits, general health, mental health, physical health, difficulty walking/climbing stairs, sex, age, education level, income level. Similarly the diabetes and the mental health datasets were individually cleaned, curated, and finalized.
Machine Learning Model Decided to use logistics regression after extensive research and consideration for other machine learning models Extracted response and predictors. Assigned Y as dependent variable (HeartDiseaseorAttack) and X as 21 independent variables dataframe while predicting heart disease probability. Split dataset into random train and test with ratio of 0.25 Imported modules such as preprocessing and pipeline from sklearn to scale the model Ran the model and dumped it into a PKL file using joblib. Used spyder to create streamlit application where we use the ML Model (PKL file) to predict heart disease risk. The accuracy of the models of heart disease, diabetes, and mental health ranged from 75% to 89% which shows our model is not only ideal but also realistic.
Challenges we ran into
Initially we were a bit overwhelmed with how to implement our chatbot due to its complexity. We also were not entirely sure on how to implement the multiple Machine Learning models that we planned on using. But our most significant challenges were simply how we wanted to approach the problem, and what possible solutions we could provide for the same. However we were able to incorporate most of our ideas in a comprehensive manner via our idea of using a chatbot.
Accomplishments that we're proud of
We are extremely proud of the fact that all of our models boast an accuracy ranging from 75-90%. This high accuracy percentage allows our chatbot to give specific and accurate results, which can be extremely important when talking about people's lives and health. We are also proud of our chatbot itself, as it has the potential to possibly save lives and make many people's lives better, just by providing them with direction in regards to how to stay healthy and take preemptive measures.
What we learned
We were initially confused on how to implement the chatbot with all our different ideas for different kinds of models. However over the course of the project we learnt a lot about how these different models can be utilized, and to properly implement an interactive chatbot. We learnt about numerous modules such as sklearn, and more importantly how to implement them with data that needed to be cleaned. We learnt how important data cleaning is, especially when working with large scale surveys and such.
What's next for Universal Health Diagnosis Engine
We would like to work on this project beyond the hackathon and would like to work on the full stack web development of this webapp so that we can connect databases which will allow elderly citizens and rural patients to send their data to their nearest doctor and contact emergency services if required. We would also like to further train our chatbot and work on different ML Model apart from logistic regressions for even greater accuracy.
Built With
- jupyter
- machine-learning
- python
- streamlit
- tensor-flow
Log in or sign up for Devpost to join the conversation.