Inspiration
Approximately 805,000 million people in the United States suffer from a heart attack annually resulting in 697,000 deaths. Often, symptoms of heart attacks are present hours, days, or weeks before cardiac arrest occurs. Although heart attacks cannot be prevented, if the patient is in immediate care of a doctor, lasting damage to the heart can be altogether prevented. But a trip to a doctor on a hunch could prove to be expensive, or sometimes impossible for people without access to healthcare. We made it our goal to create a web application that uses machine learning technology to provide an accurate prediction when someone may suffer from a heart attack based on their medical information.
What it does
Our application takes in data that the user provides about their medical history and provides an accurate prediction about how likely the user is to suffer from a heart attack.
How we built it
Using supervised machine learning, we trained a model with datasets that we found online to detect the early onset of a heart attack using features such as age, gender, cholesterol, blood pressure, and more. After testing the dataset, we were able to use it to detect whether or not a heart attack was imminent in the patient using algorithms such as support vector and random forest classifiers. Using the outputs produced by these algorithms, we used bag and boost ensembles to make our results most accurate. To create a more user friendly experience, we used Django to create a website to enter specific features; this website then runs the machine learning program to predict if the person will have a heart attack.
Challenges we ran into
One big challenge that we ran into was connecting the front end to the backend which consisted of several machine learning models. To solve this problem, we pickled the files and ran them all on an online IDE. By doing this, we were able to use the training of machine learning and form a program that tests the inputted values from the website.
Accomplishments that we're proud of
We are very proud of the fact that we were able to make this website work especially because neither of us has ever had any experience with machine learning in the past. To learn enough for this project, we used multiple online resources and packages that were made by others. Overall though, the code that we put out was our own and it functioned as intended.
What we learned
We learned about machine learning and how machine learning can be implemented into the medical field as well as smart watch technology so that it can save more lives by providing accurate predictions.
What's next for Cardiacsaver
As mentioned earlier, modern smart devices can track heart rate, which is very helpful to determine whether or not there will be a heart attack, but other attributes are equally important for our machine learning algorithm to give the best possible output. Although our website is mobile friendly, we plan on making mobile phone applications that don’t need access to the internet which can also track cholesterol based on food intake, amount of exercise, and maximum heart rate while also allowing the user to input values such as age, sex, and medical history. This will allow the device to directly predict a heart attack before it happens and could save a life.
Try it out link
When you press on the "Try it out" link, make sure to press the run button and open the website in a new tab in order to use the application. The repl may take a few minutes to run as the project needs to load in the required dependencies in order for the application to display. If it takes a while to load, refresh the page and press run again. The best way to use the app is by logging into a repl.it with an account. However, this is not required.
Built With
- css3
- django
- google-maps
- html5
- javascript
- pycharm
- python
- repl.it

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