This document presents a project that aims to predict the chances of stroke occurrence using machine learning techniques. Five different algorithms are used and compared to achieve better accuracy. The objective is to create a user-friendly application to predict stroke risk by entering patient data. A dataset from Kaggle is used, and data preprocessing is applied to balance the dataset. Python is used for the frontend and MySQL for the backend. Algorithms are compared to select the best for stroke prediction. The project concludes that an accuracy of 93.68% can be achieved using the XGBoost model.
Anuman- An inference for helpful in diagnosis and treatment
BRAIN STROKE REVIEW.pptx
1. BRAIN STROKE
PREDICTION USING
MACHINE LEARNING
By
NAME: S.Rajayogha
REG NO: 9921146010
REVIEW: 2ND REVIEW
branch/stream: M.Sc. Data Science
GUIDE NAME: Dr. k Satheesh Kumar
2. ABSTRACT
• Stroke is a destructive illness that typically influences individuals over the age of 65 years age.
• Prediction of stroke is time-consuming and tedious for doctors.
• Therefore, the project mainly aims at predicting the chances of the occurrence of stroke using
emerging Machine Learning techniques.
• Five different algorithms are used and a comparison is made for better accuracy.
• Aim is to create an application with a user-friendly interface that is easy to navigate and enter
inputs.
3. INTRODUCTION
• A stroke is a life-threatening condition that happens when part of your brain doesn't have
enough blood flow.
• An ischemic stroke is caused by a blockage cutting off the blood supply to the brain. This is
the most common type of stroke. A hemorrhagic stroke is caused by bleeding in or around the
brain. A transient ischemic attack or TIA is also known as a mini-stroke.
• Hemorrhagic strokes are particularly dangerous because they cause severe symptoms that get
worse quickly.
• The Stages of stroke are Stage 1: Flaccidity(soft). Stage 2: Spasticity (clumsy neural
problem). Stage 3: Increased Spasticity. Stage 4: Decreased Spasticity
• Foods high in potassium, such as sweet and white potatoes, bananas, tomatoes, prunes, melon,
and soybeans, can help you maintain healthy blood pressure — the leading risk factor of stroke.
4. OBJECTIVE AND SCOPE
• The prime objective of this project is to construct a prediction model for predicting stroke
using machine learning algorithms.
• The dataset was obtained from the Kaggle website "Healthcare dataset stroke data"
6. EXISTING SYSTEM
• About 3.0 million deaths resulted from an ischemic stroke while 3.3 million deaths resulted
from hemorrhagic stroke. Hence, correct detection and finding the presence of a stroke inside
a human becomes essential. In the existing system, there are various medical instruments
available in the market for predicting brain stroke but they are very much expensive and they
are not efficient enough to be able to calculate the chance of having a brain stroke.
• Takes a lot of time to find the disease.
• Inaccuracy and inefficiency of results.
7. PROPOSED SYSTEM
• Machine Learning is a faster-emerging technology of Artificial Intelligence
that contributes various algorithms like Logistic Regression, SVM, Random
Forests and many more which is effective in making decisions and
predictions from the large quantity of data produced by the healthcare
industry. Based on the proposed problem, ML provides different classification
algorithms to divine the probability of a patient having a Brain Stroke.
• It detects the brain stroke disease less time.
• More accuracy and efficiency.
8. DATASET
From the Kaggle website, https://www.kaggle.com/asaumya/healthcare-dataset-stroke-data
9. DATASET
• There were 5110 rows and 12 columns in this dataset. The value of the output column
stroke is either 1 or 0.
• The number 0 indicates no stroke risk was identified, while the value 1 indicates a
stroke risk was detected.
• The probability of 0 in the output column (stroke) exceeds the possibility of 1 in the
same column in this dataset.
• 249 rows alone in the stroke column have the value 1, whereas 4861 rows have the
value 0.
• To improve accuracy, data preprocessing is used to balance the data.
• It contains the total number of stroke and non-stroke records in the output column
before preprocessing.
10. FRONTEND AND BACKEND
I’m Using Python as the front and MySQL as the backend in a healthcare data stroke,
project can provide several benefits:
• 1. Python is a popular programming language for data analysis and visualization, which
can be useful in analyzing stroke data.
• 2. MySQL can handle large amounts of data and can be easily scaled to meet the needs
of the project.
• 3. The combination of Python and MySQL can provide seamless integration between
the front end and back end, making it easier to manage and analyze data.
11. FRONTEND AND BACKEND
• 4. Python has a wide range of libraries and frameworks that can be used to build
interactive and user-friendly interfaces for the project.
• 5. MySQL is known for its reliability and stability, which is crucial in a healthcare
project where the accuracy and consistency of data are critical.
• 6.Overall, using Python for the front end and MySQL for the back end in a healthcare
data stroke project can provide a powerful and efficient solution for managing and
analyzing healthcare data.
12. DJANGO
• Django is a web framework written in Python, It is used for building web applications
quickly and easily by providing many built-in features and tools.
• On the frontend side, Python can be used with various web development frameworks and
libraries such as Flask, Bottle, and Pyramid. These frameworks provide tools for building
web applications using Python code.
• On the Backend side, When using Django with MySQL, the database connection settings
need to be configured in the settings.py file of the Django project. This includes specifying
the database engine, name, user, password, host, and port.
• Django with frontend Python and backend MySQL is a powerful combination for building
web applications quickly and easily. With Django's built-in features and tools, developers can
focus on building the application logic while MySQL provides a reliable and scalable
backend for storing and managing data.
13. Stroke prediction by giving patients data
Display whether the patient has a stroke or not.
14. Algorithm Comparison
To balance the data in the dataset. It is a multiclass classification so we want to do
a comparison as possible
15. CONCLUSION
• The importance of knowing and understanding the risks of brain stroke is very much in these
trying times.
• The model predicts the probability of brain stroke on the basis of very trivial day-to-day and
known to all parameters.
• This makes this project highly relevant and of need to society.
• The objective of implementing the project on a web platform was to reach as many
individuals as possible.
• The early warning can save someone’s life who might have a probability of a stroke.
• Therefore, in conclusion, this project helps us predict the patients who are diagnosed with
brain stroke by cleaning the dataset and applying the XGBoost Model to get an accuracy of
an average of 93.68%.
16. REFERENCE
• [1] Tasfia Ismail Shoily, Tajul Islam, Sumaiya Jannat, and Sharmin Akter Tanna
"Detection of stroke using machine learning algorithms", 10th International Conference on
Computing, Communication and Networking Technologies (ICCCNT), IEEE, July 2022.
• [2] JoonNyung Heo , Jihoon G. Yoon , Hyungjong Park , Young Dae Kim , Hyo Suk Nam
and Ji Hoe Heo. "Stroke prediction in acute stroke", Stroke. 2019;50:1263-1265, AHA
Journal, 20 Mar 2021.
• [3] Jaehak Yu, Damee Kim, Hongkyu Park, Seung-Chul Chon,Kang Hee Cho, Sun-Jin
Kim, Sungkyu Yu, Sejin Park and Seunghee “Semantic analysis of NIH stroke”, 2019
International Conference on Platform Technology and Service (PlatCon), IEEE, 30 Jan
2019.
17. PUBLICATION
Rajayogha, S., & Bruxella, D. J. M. D. (2023, March 31). Early Prediction of Brain
Stroke Using Logistic Regression. InternationalJournal for Research in Applied
Science and EngineeringTechnology, 11(3), 1355–1361.
https://doi.org/10.22214/ijraset.2023.49651