Inspiration

Our group's goal was to create a project to achieve a better and more sustainable future for all! We wanted a web application that would ensure good health and well-being to everyone and everywhere. We further specialized our approach to solving this worldwide problem in one domain: cardiovascular diseases.

What it does

Our program trains a model using logistic regression using a set of data with the following variables:

  • Age (in days)
  • Biological sex at birth
  • Height (in cm)
  • Weight (in kg)
  • Systolic blood pressure (in mmHg)
  • Diastolic blood pressure (in mmHg)
  • Cholesterol level (categorical; choices are "normal", "above normal", and "well above normal")
  • Blood glucose level (categorical; choices are "normal", "above normal", and "well above normal")
  • Whether or not the person smokes
  • Whether or not the person drinks alcohol
  • Whether or not the person exercises regularly
  • Whether or not the person has heart disease

The user can enter values for all of these variables (except the last one). Based on the values, the user is given a prediction for whether they have cardiovascular disease. Based on that prediction, the program recommends potential next steps with links to resources that a person can use to get potential help or get more information about cardiovascular disease.

How we built it

Back end: The project relies on a machine learning model that uses a logistic regression algorithm. The medical dataset used in this project was obtained from Kaggle and contained various features of 70000 patients' health and a binary indicating whether or not they were each diagnosed with a cardiovascular disease. The pandas library was used to import the dataset and analyze it. Then, using the scikit-learn machine learning library, the dataset was split into training and testing sets. The data was also normalized with feature scaling to make it easier for the model to learn from the data trends. The model was then trained with the training datasets using a logistic regression algorithm. Front end: The front end of our project is a Django based web server. The project uses a basic HTML form to collect the users data, run it through our machine learning model and then direct the user to their appropriate results page. The result pages show transparency by showing the accuracy of the model and graphs representing our data. We want to make it clear to users that this is a prediction and not a diagnosis. We have also added external links to relevant articles as well as converting our Jupyter notebooks into HTML so that the more curious and technically literate users can analyze our process.

Challenges we ran into

From Django, Git, CSS and HTML, there was a big learning curve getting the technologies to work together smoothly. We spent numerous hours with mentors to push through these problems. There were also issues with the gender input as our dataset only had options for male and female. This does not align with our inclusive mission of providing easier healthcare resources to all individuals as it did not include an "other" option for gender. However, this was the only way we could train the machine learning engine effectively.

Accomplishments that we're proud of

We're immensely proud that we were able to launch a web app that can effectively predict a disease as severe as cardiovascular disease. We also feel accomplished about the number of new technologies we learned in the creating process that we can utilize in future projects. Despite the challenges faced, this was a very fun project and allowed us to enjoy various new topics within Computing that my group members and I have never thought about or engaged in before!

What we learned

Since most of the technology we used for the first time during this hackathon, we learned a lot! Our team members learned Django, Git, CSS, and HTML for the very first time. As well, we spent several hours in the mentor voice channel to confirm our knowledge and debug with the software. In addition, we also learned to use Google Colab and how to create a logistical regression machine learning algorithm, and the difference between logistical and linear regression (a sigmoid function). We visualized the end results of the machine learning engine in attractive graphs using Matplotlib and Seaborn, another useful tool we learned!

What's next for Cardiovascular Detection Web App

In the future, we plan to implement more datasets and expand our web application to be able to detect more kinds of prevalent diseases! A few ones we have in mind are Parkinson's disease, diabetes, types of cancer, etc. We also plan to implement a main menu where the user can navigate through which various diseases they plan to detect and immediately get resources that will help serve them. We hope our future additions to this project can contribute towards our bigger goal of achieving a better and more sustainable future for us all.

Cardiovascular Disease Resource List

Heart & Stroke Foundation — Cardiovascular Disease https://www.heartandstroke.ca/heart-disease/conditions?gclid=Cj0KCQiA4b2MBhD2ARIsAIrcB-TsaYUb9CNtBzcLNf5bJLNPSQCs5AobQaq-51Y3kTFuvnqhD_FEdWEaAvnEEALw_wcB&gclsrc=aw.ds

Public Health Agency of Canada — Government of Canada https://www.canada.ca/en/public-health/services/publications/diseases-conditions/heart-disease-canada.html

Cardiovascular Disease Patient Resources — Alberta Health Services https://www.albertahealthservices.ca/info/Page7735.aspx

Patient Information Resource — How Secondary Protection Can Keep You Healthy https://thrombosiscanada.ca/secondary-prevention-info/?gclid=Cj0KCQiA4b2MBhD2ARIsAIrcB-S6DlDrm-Nhc7ZfA9PeK2VugwY0Pdhh9ROqUOrNaWfVerlJ5fGt9wEaAhJwEALw_wcB

Cardiovascular Disease — Public Health Ontario https://www.publichealthontario.ca/en/diseases-and-conditions/chronic-diseases-and-conditions/cardiovascular-disease

Heart Disease Patient Education — Centers for Disease Control and Prevention https://www.cdc.gov/heartdisease/materials_for_patients.htm

Built With

Share this project:

Updates