Innovative AI Heart Attack Prediction

My Model identifies if individuals are at risk of heart attacks.
Grade 9

Problem

THE LINK TO MY PROJECT VIDEO CAN BE FOUND IN THE FIRST PAGE OF MY LOGBOOK.

The problem I am attempting to address with my Heart Attack Prediction model is the identification and prediction of individuals at risk of experiencing a heart attack. The goal is to enhance early detection and intervention by leveraging coding, machine learning, and AI algorithms. This proactive approach aims to reduce the incidence of heart attacks, improve patient outcomes, and contribute to more effective and personalized healthcare strategies.

 

Artificial intelligence for heart attack prediction | BHF - BHF


 

Method

In order to solve the initial problem which I introduced, I came up with a solution that utilized our future; AI. I came up with an initial solution which was far to complex. This solution involved the usage of a chip which would reside on the outside of the heart, which would identify any blockages, blood flow levels and any obstacles in the way of blood flow through ventricles. This would count as an advanced prediction tool which has significant potential, but simply too complex to tackle in High School.

Next, I moved on to the next best solution; A heart attack prediction model which utilizes coding and machine learning to identify is someone is at risk of a heart attack.

 

The model takes 12 variables as input:

1. Age - The individuals age.

2. Anaemia - Anemia is a condition in which the body does not have enough healthy red blood cells

3. Creatinine Phosphokinase - When the total CPK level is very high, it most often means there has been injury or stress to muscle tissue, the heart, or the brain. Muscle tissue injury is most likely. When a muscle is damaged, CPK leaks into the bloodstream. Finding which specific form of CPK is high helps determine which tissue has been damaged.

4. Diabetes - health condition that affects how your body turns food into energy

5. Ejection Fraction - Ejection fraction (EF) is a measurement, expressed as a percentage, of how much blood the left ventricle pumps out with each contraction. An ejection fraction of 60 percent means that 60 percent of the total amount of blood in the left ventricle is pushed out with each heartbeat. A normal heart’s ejection fraction is between 55 and 70 percent.

6. High Blood Pressure - Pressure in vessels is high

7. Platelets - fight infection, stop clotting

8. Serum Creatinine - when this is high, it can mean that your kidneys are not working well

9. Serum Sodium- A sodium blood test is a routine test that allows your doctor to see how much sodium is in your blood

10. Sex - Gender

11. Smoking - Yes or No

12, Follow Up Time in Hospital

 

In order for this project to run the way it did. I required a coding base where I could work on my model. I used Collab Notebooks to work on my model. Along with my computer, and a dataset I used from Github, my model was a success. Github and Kaggle 

I compiled lots of research about different types of datasets, algorithms. In addition, I did research on the human heart as well. DIfferent methods of heart attack predicting algorithms including logistic regression, decision trees, random forests, support vector machines (SVM), and artificial neural networks.

Each algorithm has its strengths and limitations, and the choice depends on the specific dataset and problem at hand. I used the most successful method of random forests, which are often favoured for their ability to combine multiple algorithms and improve prediction accuracy:

  • Logistic regression is a predictive analysis. It is used to describe data and to explain the relationship between one dependent binary variable and one or more nominal, ordinal, interval or ratio-level independent variables. Logistic Regression is another statistical analysis method borrowed by Machine Learning. Ultimately, a variable has only 2 outputs, for example, A person will survive this accident or not, The student will pass this exam or not. The outcome can either be yes or no (2 outputs). 
  • A decision tree is a tree-like structure that represents a series of decisions and their possible consequences. It is used in machine learning for classification and regression tasks. An example of a decision tree is a flowchart that helps a person decide what to wear based on the weather conditions. The purpose of a decision tree is to make decisions or predictions by learning from past data. It helps to understand the relationships between input variables and their outcomes and identify the most significant features that contribute to the final decision.
  • Random Forest is a supervised machine-learning algorithm made up of decision trees. It is used for both classification and regression problems.
  • A neural network is a method in artificial intelligence that teaches computers to process data in a way that is inspired by the human brain. It is a type of machine learning process, called deep learning, that uses interconnected nodes or neurons in a layered structure that resembles the human brain.

The sample size of this project was based on information compiled on a dataset which was a crucial part of this project. Without the data collected, there would be no project. It was a sample size of 300 people that made this dataset


 

Analysis

This project was a major success where the solutions I made to the initial problems at the beginning of my presentation were solved or quite close to being solved. The only obstacle in my way is the amount of scientific data, expert coding professionals I would need. In this part of my presentation, I will insert graphs, and statistics to prove my successes with this project(Scientific Data to support my Hypothesis, Theory or Goal)

Results from Model without scaling data

 

Results with Scaling Data

 

Results with GridSearch function


 

Conclusion

In conclusion, the development and implementation of the heart attack prediction model represent a significant stride in the realm of cardiovascular health. The amalgamation of coding, machine learning, and AI algorithms allowed for the creation of a robust predictive tool that takes into account multiple parameters to assess an individual's risk of a heart attack. Through the meticulous application of Neural Networks and random forest algorithms, the model achieved commendable accuracy levels in forecasting potential cardiac events.

 

The model's reliance on twelve distinct parameters, including age, sex, smoking habits, and alcohol consumption, underscores its comprehensive approach in capturing the multifaceted nature of cardiovascular risk factors. The utilization of diverse algorithms, particularly Neural Networks, facilitates intricate pattern recognition, enabling the model to discern intricate relationships between variables and enhance its predictive capabilities.

 

This project's significance extends beyond its technical intricacies, as it addresses a pressing concern in contemporary healthcare—early detection of heart-related issues. By providing a proactive tool that aids in identifying individuals at risk, the model contributes to the potential mitigation of adverse cardiac events. Furthermore, the remote accessibility of this predictive tool aligns with the evolving landscape of telehealth, offering a convenient means for individuals to assess their cardiovascular health.

 

As with any scientific endeavor, this project is not without limitations. The model's accuracy is contingent on the quality and diversity of the dataset used for training, and ongoing refinement is essential to ensure its applicability across diverse demographic groups. Ethical considerations, such as data privacy and the responsible use of predictive technologies, must be paramount in the ongoing development and deployment of such models.

 

In essence, this heart attack prediction model not only showcases the potential of modern technologies in healthcare but also underscores the importance of interdisciplinary approaches in addressing complex medical challenges. As we venture into an era where data-driven insights play an increasingly pivotal role in healthcare, this model serves as a testament to the transformative power of innovation and its potential to positively impact public health.


 

Citations

References

(2016, November 13). YouTube: Home. Retrieved February 8, 2024, from https://iopscience.iop.org/article/10.1088/1742-6596/1950/1/012081/meta

(2016, November 13). YouTube: Home. Retrieved February 8, 2024, from https://www.scitepress.org/Papers/2022/110883/110883.pdf

(2016, November 13). YouTube: Home. Retrieved February 8, 2024, from https://esource.dbs.ie/handle/10788/4242

(2016, November 13). YouTube: Home. Retrieved February 8, 2024, from https://www.researchgate.net/profile/Maryam-Aljanabi/publication/328031918_Machine_Learning_Classification_Techniques_for_Heart_Disease_Prediction_A_Review/links/5e87ab1c92851c2f527b977f/Machine-Learning-Classification-Techniques-for-Heart-Disease-Predicti

(2016, November 13). YouTube: Home. Retrieved February 8, 2024, from https://iopscience.iop.org/article/10.1088/1742-6596/1950/1/012081/meta

(2016, November 13). YouTube: Home. Retrieved February 8, 2024, from https://journals.sagepub.com/doi/full/10.1177/1074248420928651

(2016, November 13). YouTube: Home. Retrieved February 8, 2024, from https://github.com/gauravjain2/heart-failure-prediction/blob/main/Models/Final_Model.ipynb

(2016, November 13). YouTube: Home. Retrieved February 8, 2024, from https://github.com/anik199/Heart-failure-prediction/blob/main/heart-failure-beginner-friendly-91-accuracy.ipynb

,. (2023, May 19). , - YouTube. Retrieved February 8, 2024, from https://www.jacc.org/doi/abs/10.1016/j.jacc.2020.11.030

Cardiac Risk Calculator and Assessment. (2022, July 1). Cleveland Clinic. Retrieved February 8, 2024, from https://my.clevelandclinic.org/health/articles/17085-heart-risk-factor-calculators

Galarnyk, M. (2022, July 28). Train Test Split: What it Means and How to Use It. Built In. Retrieved February 8, 2024, from https://builtin.com/data-science/train-test-split

Heart attack - Symptoms & causes. (n.d.). Mayo Clinic. Retrieved February 8, 2024, from https://www.mayoclinic.org/diseases-conditions/heart-attack/symptoms-causes/syc-20373106

Heart Disease Calculator-Cannon Falls. (n.d.). Mayo Clinic Health System. Retrieved February 8, 2024, from https://www.mayoclinichealthsystem.org/locations/cannon-falls/services-and-treatments/cardiology/heart-disease-risk-calculator

Heart Failure Prediction Dataset. (n.d.). Kaggle. Retrieved February 8, 2024, from https://www.kaggle.com/datasets/fedesoriano/heart-failure-prediction

Johnson, K. (2018, June 12). (PDF) Artificial Intelligence in Cardiology. ResearchGate. Retrieved February 8, 2024, from https://www.researchgate.net/publication/325585229_Artificial_Intelligence_in_Cardiology

landajuela/cardiac_ml: Machine Learning for Cardiac Electrical Imaging. (n.d.). GitHub. Retrieved February 8, 2024, from https://github.com/landajuela/cardiac_ml

Machine learning-based heart disease diagnosis: A systematic literature review | Request PDF. (n.d.). ResearchGate. Retrieved February 8, 2024, from https://www.researchgate.net/publication/359589806_Machine_learning-based_heart_disease_diagnosis_A_systematic_literature_review

Machine Learning in Modern Healthcare. (2023, June 30). International Journal of Advanced Medical Sciences and Technology (IJAMST). Retrieved February 8, 2024, from https://www.ijamst.latticescipub.com/wp-content/uploads/papers/v3i4/D3037063423.pdf

rashmiranu/Health_App: This is a Machine Learning and Deep Learning project that can predict the chances of getting diseases like Heart_Failure, Diabetes, Malaria and Tuberculosis. (n.d.). GitHub. Retrieved February 8, 2024, from https://github.com/rashmiranu/Health_App

Acknowledgement

I acknowledge my Mentors from Juniotech - Tim Gubski, Princeton University, & Irada Shamilova, Juniotech - who helped me throughout my project. I also want to acknowledge Ms Heather Lai, for helping me turn this project into a success. 

I want to acknowledge GitHub, Kaggle and other key researching tools which were used in my project, and without these resources, my project wouldn’t be possible. 

I want to acknowledge the Libin Cardiovascular Institute who acted as a mentor throughout my project and accepted my project into an advanced world of research. This was an eye opening experience, as I had the opportunity to see real life applications of Machine Learning, AI data management, and extensive research and their key roles in developing a model that will save millions of lives from Cardiovascular challenges.

Finally, I want to acknowledge my mom for her significant support throughout my project, and acting as second voice on every decision of mine along the way. I loved the constructive criticism that you gave me, to make my project better. Thank you Mom!

THANK YOU EVERYONE FOR YOUR HELP IN MY PROJECT!

 

Acknowledgements Example for an Academic Research Paper ...