Inspiration
These unprecedented times have caused significant changes in our lifestyle. Being confined to our homes has reduced the level of activity that most people engage in. To raise awareness on the risks of an unhealthy lifestyle we decided to use our knowledge of programming and machine learning to develop a web application that allows users to see their chances of developing cardiovascular diseases with their current lifestyle.
What it does
We created a random forest regression model that predicts the risk of cardiovascular disease based on a multitude of lifestyle factors. We implemented this model into a dynamic website, so users can input their data/lifestyle habits and get an accurate prediction for their risk of cardiovascular disease.
How we built it
After scouring countless data sets, we were able to find an extensive data set that would allow our regression to yield accurate results. We first processed and cleaned our data using numpy and pandas. Then we used sklearn to generate a random forest regression model based on our training data. Using this model, we were able to accurately predict someone's risk of cardiovascular disease based on a multitude of lifestyle habits. Then we set up a flask dynamic website, which ran using html templates that we designed. On this website, we allowed users to input their data, and dynamically work with this data using GET AND POST with Flask. Once we used this data for our regression model to predict the risk of cardiovascular disease, we displayed it to the user using flask page redirection.
Challenges we ran into
We were familiar with the machine learning aspect of this project but both our members were new to web development. We took this as a learning opportunity and spent the entire day learning backend development in flask to develop a dynamic site that uses user input to show output of their probability of developing a cardiovascular disease that our ML model calculated.
Accomplishments that we're proud of
Despite having no knowledge of dynamic website development coming into this event, we used TAMUHACK 21 to learn new skills in backend development with flask to create a web application that displays the results of our ML model and allows users to input data to make their own predictions.
What we learned
Learned to utilize flask, HTML, and CSS.
What's next for Machine Learning to Predict Risk of Cardiovascular Disease
Firstly, we plan to publish the webpage we developed so it can be available to the public. Then we look to make improvements to the user interface and the design of our site.

Log in or sign up for Devpost to join the conversation.