0% found this document useful (0 votes)
6 views5 pages

Brain Stroke Prediction Using Machine Learning Algorithm

The document discusses a study on predicting brain strokes using machine learning algorithms, particularly focusing on the Random Forest Classifier. The research highlights the importance of early detection and intervention to reduce the risk of severe outcomes from strokes, utilizing patient health data such as age, hypertension, and glucose levels. The results indicate that the Random Forest model achieved an accuracy of approximately 96.99%, demonstrating its effectiveness in stroke risk prediction.

Uploaded by

ivcsebmrecw
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views5 pages

Brain Stroke Prediction Using Machine Learning Algorithm

The document discusses a study on predicting brain strokes using machine learning algorithms, particularly focusing on the Random Forest Classifier. The research highlights the importance of early detection and intervention to reduce the risk of severe outcomes from strokes, utilizing patient health data such as age, hypertension, and glucose levels. The results indicate that the Random Forest model achieved an accuracy of approximately 96.99%, demonstrating its effectiveness in stroke risk prediction.

Uploaded by

ivcsebmrecw
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

International Journal of Scientific Research in Engineering and Management (IJSREM)

Volume: 09 Issue: 04 | April - 2025 SJIF Rating: 8.586 ISSN: 2582-3930

Brain Stroke Prediction Using Machine Learning Algorithm

Mr. Pradip Bhakare1, Anushka Burade2, Kiran Mali3, Tapasya Gawai4, Mayuri Hingane5
1
[Link], Department of ENTC, MGICOET Shegaon, Maharashtra.
2,3,4,5
Students, Department of ENTC, MGICOET Shegaon, Maharashtra.

***
Abstract - Brain stroke is a serious medical illness that A brain stroke results when a section of the brain is
may result in severe neurological damage or even death deprived of its blood supply or has its blood supply
if left undetected and untreated. Predicting the risk of diminished, thereby not allowing the brain tissue to
stroke at an early stage can substantially improve clinical receive oxygen and Nutrients, which may result in to
decision-making and prevention care. The proposed work brain damage or death. Strokes usually result from a
involves using machine learning for predicting the risk of blocked artery (ischemic stroke) or the breaking of a
brain stroke based on patient health data. The used dataset blood vessel (hemorrhagic stroke).
includes related features like age, Hypertension, heart
disease, smoking status, BMI, glucose level, and work In a few instances, there is a temporary blockage in the
type was employed. Different machine learning form of a transient ischemic attack (TIA), commonly
algorithms such as Logistic Regression, Decision Tree, known as a “mini-stroke.” Sudden numbness or weakness
Random Forest, Support Vector Machine (SVM), and K- in the Face, arm, or leg (especially on one side), difficulty
Nearest Neighbors (KNN) were tried and evaluated speaking or understanding speech, Vision problems,
against performance measures such as accuracy, dizziness, and severe headache. Stroke is a medical
precision, recall, and F1-score. The highest prediction emergency that needs immediate treatment to reduce
accuracy was found in the random Forest model, brain damage and enhance chances of recovery. Early
implying that it could be used to accurately classify based diagnosis and treatment can very much minimize the
on this problem. This research demonstrates the potential possibilities of long-term disability or death.
of machine learning to enhance stroke diagnosis and
PROBLEM STATEMENT
assist Healthcare decision – making.
Brain stroke is a severe medical disorder that may cause
Key Words: Brain Stroke, Stroke Prediction, Random long-term disability or fatality if it is not detected and
Forest, Health Data, Classification, Early Detection, treated in its early stage. The project focuses on designing
Health Care Analytics. a machine learning model with the help of a Random
I. INTRODUCTION Forest Classifier to make an estimate of how likely a
person is to get a brain stroke. The system will examine
Brain stroke is a serious medical condition that results the data of a patient his or her age, hypertension, heart
when the blood supply to a region of the brain is cut off disease, BMI, level of glucose, and other relative features
or diminished, depriving brain tissue of oxygen and to ascertain individuals at maximum risk. Early prediction
nutrients. This can cause damage or death to brain cells will help the system support doctors in their decisions and
within minutes, leading to long-term disability or death if thereby save lives earlier.
not treated immediately. Strokes are generally
categorized into two forms: ischemic strokes, resulting OBJECTIVE
from blockages, and hemorrhagic strokes, resulting from
bleeding within the brain. • To develop a predictive model for brain stroke
based on the Random Forest Classifier algorithm.
Stroke is ranked among the primary causes of death and • To predict patient health parameters (e.g., age,
permanent disability in the world, according to world hypertension, heart disease, glucose level, BMI).
health statistics.

© 2025, IJSREM | [Link] DOI: 10.55041/IJSREM46323 | Page 1


International Journal of Scientific Research in Engineering and Management (IJSREM)
Volume: 09 Issue: 04 | April - 2025 SJIF Rating: 8.586 ISSN: 2582-3930

• To categorize people based on their risk of stroke. We investigate into the clinical, biochemical and
neuroimaging factors related with the outcome of stroke
• To help healthcare professionals with early patients to generate a predictive model utilizing machine
detection and decision-making. learning techniques for prediction of mortality and
• To enhance patient outcomes through timely morbidity 3-months post admission. Finally, machine
prediction and intervention. learning algorithms RF could be effectively utilized in
stroke patients for long-term outcome prediction of
II. LITERATURE REVIEW mortality and morbidity. [5]
This study employs a variety of physiological parameters The aim of this paper is to forecast the stroke vulnerability
and machine learning algorithms, including Logistic status of patients using a random forest (RF) machine
Regression (LR), Decision Tree (DT) Classification, learning model. The model was developed based on
Random Forest (RF) Classification, and Voting Python computer programming language from healthcare
Classifier, to train four models for accurate prediction. dataset stroke data collected from the Kaggle machine
Random Forest was the top performing algorithm for the learning dataset repository. The dataset was well cleaned
task with an accuracy of about 96 percent. The dataset and the clean dataset was utilized to train the random
employed in method development was the open-access forest machine learning model for effective forecasting of
Stroke Prediction dataset. [1] stroke the results obtained from the random forest model
were evaluated using a confusion matrix and it was found
In this paper, we propose a novel stroke detection
that random forest is a very good choice of algorithm for
algorithm to predict the occurrence of stroke. We
predicting stroke Vulnerability as evidenced in its
employed a dataset with must detail of crucial parameters
prediction accuracy of 93%. [6]
which are responsible for the brain stroke such as: Age:
Body Mass Index (BMI): Gender: Heart Disease: This study explores these deep learning models’
Smoking Status etc. to generate a prediction model. The efficiencies in contrast to other Approaches that rely on
performance of the models was compared using various stacking techniques. High accuracy will be obtained by
metrics like accuracy, F1 score, recall, precision. Our the trained models based on CNN algorithms, VGG-16,
results indicated that the Support Vector Machine and ResNet, which achieve precision, recall, specificity,
algorithm performed better than other models, with an and an F1-score. [7]
accuracy of 99.5%, precision of 99.9%, recall of 99.1%,
F1-score of 99.5% and specificity of 99%.[2]
In other work, they have trained the models for correct
The primary objective of this research is to forecast the prediction with machine learning approaches such as
likelihood of a brain stroke occurring at an early stage Logistic Regression Algorithm, Decision Tree
using machine learning algorithms. Different Classification algorithm, Random Forest Classification
classification models such as, K-Nearest Neighbor (K- Algorithm, K-Nearest Neighbors Algorithm, Support
NN), Logistic Regression (LR), Random Forest (RF), Vector Machine Algorithm, and Naïve Bayes
were effectively applied in this study for classification Classification algorithm. The algorithm that did this job
research. The performance of the method is tested by with the best accuracy was Support Vector Machine, with
Precision, Recall, and F1 Score evaluation metrics. [3] an accuracy of nearly 94.6%. In this suggested analysis,
the process of predicting stroke has been improved by
The major aim of the project is to enhance the accuracy
utilizing Random Forest Classification and XGBoost
of stroke detection, which encompass real-time
Algorithm techniques. Random Forest Classification and
deployment and interpretability problems with logistic
XGBoost Algorithm, with an accuracy of around 98%,
Regression. Our stroke prediction algorithm performance
was the algorithm that did these tasks best. [8]
was tested by confusion Metrics-including accuracy,
precision, recall and F1-score. At the conclusion of
research, Random Forest model provided an accuracy of
98.5% against the current model logistic Regression that
has 86% accuracy. [4]

© 2025, IJSREM | [Link] DOI: 10.55041/IJSREM46323 | Page 2


International Journal of Scientific Research in Engineering and Management (IJSREM)
Volume: 09 Issue: 04 | April - 2025 SJIF Rating: 8.586 ISSN: 2582-3930

This paper delves into the creation of an effective Feature Selection:-The Feature importance plot shows
framework for the prediction of chronic stroke prevalence how much each feature contributes to predictions. The
with the use of CNN, ResNet, and the VGG-16 deep more important features have higher bars. From Result
learning algorithms. These have enhanced decision created a Feature importance plot, look at the bars. The
support leading to the early identification of stoke higher the importance value of the feature, the more it
because it can analyze big image dataset. Measures such contributes to the predictions of the model. This can be
as reliability, F1-score, recall, precision, and specificity used to find out which factors are important for predicting
are constructed using the Sigmoid and ReLU activation stroke. The most important feature is age (0.16) while the
functions. This research investigates these deep learning most insignificant feature is bmi (0.09).
models’ efficiencies compared to other methods based on
stacking techniques. The trained models will achieve high Division of the Dataset:-• Training Set: 80%, Used to
accuracy with the algorithms of CNN, VGG-16, and train the machine learning model. The model Learns
ResNet, which achieve precision, recall, specificity, and patterns and relationships from this data. • Testing Set:
an F1 score. [9] 20%, Used for testing the model’s performance on unseen
data, assisting in verifying how well it generalizes.
III. METHODOLOGY

Model Selection-Random Forest classifier:-Random


Forest Classifier was chosen for this brain stroke
prediction model because it is strong, highly accurate, and
can efficiently handle both numerical and categorical
variables. It’s an ensemble learning method where
multiple decision trees are constructed during training and
the mode of the class is returned for classification
problems. This method over fitting and enhances
generalization to a single decision tree.

Fig.3.1: Block Diagram. A Graphical User Interface (GUI):-The GUI was


implemented with Tkinter, which is a built-in Python
Data Collection:-Kaggle or publicly available medical
library for developing desktop applications. It offers input
data on brain stroke prediction. It contains 5,110 records,
fields for users to input patient information like age,
where each row corresponds to a single patient.
gender, hypertension status, average glucose level, BMI,
and smoking status. After the user provides the necessary
Table. 3.1: Patient Health Dataset.
input and presses the “Predict” button, the GUI executes
the data and provides the outcome of the prediction either
“Stroke” or “No Stroke” on the basis of the trained
Random Forest Classifier model.

Table. 3.2: Software Requirements for Brain Stroke


Prediction System.

Data Preprocessing:-Handling Missing Values: Fill or


drop rows containing missing bmi or smoking_status.
Encoding Categorical Variables: Use one-hot encoding or
label encoding for non-numeric fields.

© 2025, IJSREM | [Link] DOI: 10.55041/IJSREM46323 | Page 3


International Journal of Scientific Research in Engineering and Management (IJSREM)
Volume: 09 Issue: 04 | April - 2025 SJIF Rating: 8.586 ISSN: 2582-3930

IV. RESULT ANALYSIS prediction as a pop-up message. Here, despite certain risk
factors such as heart disease and smoking, the model had
This study predicts the stroke for a patient based on
diagnosed the user with no risk of stroke, providing a
classification methodologies. This study brings out
congratulatory message. The backend is supported by
the effectiveness of the classification methods for
Python libraries such as Pandas, NumPy, and a Random
structured entities like patient case sheets to detect
Forest Classifier from scikit-learn, and the interface is
the stroke based on the parameters (symptoms) and
most probably developed using Tkinter.
factors.
4.2. Having Stroke

Fig. 4.3: Representation of Output for Having Stoke.

The "Brain Stroke Detection" app offers a


straightforward and easy-to-use interface for stroke risk
prediction based on user input. The form captures
information like gender, age, hypertension, heart
disease, marital status, work type, residence type,
average glucose level, BMI, and smoking status. Once
Fig.4.1: Input Values for Stroke Prediction.
the information is filled in and the "Predict Stroke Risk"
(This are the Input Values Given by the User)
button is clicked, the system processes the data and
By the classification algorithm the data given by the shows the result in a pop-up window. In this case, the
user is classified that user had a chance to get Stroke user was diagnosed with a possible stroke risk. The app
then it shows YES else it shows No. is built using Python, using libraries such as Pandas,
NumPy, and scikit-learn for data preprocessing, and the
4.1. Having No Stroke GUI is probably developed using Tkinter.

V. CONCLUSION

In conclusion, the application of the Random Forest


machine learning algorithm to predict brain stroke has
shown encouraging outcomes in terms of accuracy,
stability, and interpretability. Random Forest as an
ensemble learning technique takes advantage of the
collective decision making of a set of decision trees to
Fig. 4.2: Representation of Output for Having No Stoke. minimize the risk of over fitting. In the case of stroke
The "Brain Stroke Detection" application presents a prediction, variables like age, hypertension, heart disease,
simplistic form-based interface to predict the stroke risk. smoking status, and glucose level are important factors in
The users have to enter personal and health related determining the risk of stroke. The project assists us in
information such as age, hypertension, history of heart predicting the patients who are diagnosed with brain
disease, marital status, type of work, type of residence, stroke by preprocessing the dataset and using Random
average glucose level, BMI, and smoking. Once the data Forest model to achieve an accuracy of an average of
is entered by clicking on the "Predict Stroke Risk" button, 96.99%.
the system calculates the data displays the result of the

© 2025, IJSREM | [Link] DOI: 10.55041/IJSREM46323 | Page 4


International Journal of Scientific Research in Engineering and Management (IJSREM)
Volume: 09 Issue: 04 | April - 2025 SJIF Rating: 8.586 ISSN: 2582-3930

FUTURE SCOPE [7] Moses Adah Agana,Obono I. Ofem,Ofem Ajah


Ofem,2024 – Volume 6 [Issue 1],”Stroke Prediction with
Future work can investigate the application of deep Random Forest Machine Learning Model”,
learning methods such as Convolutional Neural Networks [Link]
(CNNs) for brain scan or MRI image analysis, which can view/111.
provide more accurate identification of stroke-prone
regions. The integration of wearable health devices and [8] Nnanna, Chidera Egegamuka,Nnanna, Ekedebe
IoT (Internet of Things) can enable real-time monitoring Ajoku, Kingsley Kelechi,Volume 9, Issue( 4, April –
and early warning systems for high-risk patients. 2024),”Development of Random Forest Model for Stroke
Furthermore, implementing the model into a mobile or Prediction”, [Link] 124/ijisrt /IJIS
web- based system with an easy-to-use GUI can help RT24APR2566.
healthcare professionals and patients make quicker, data- [9] Kamarajugadda Raviteja, [Link],Bhuvaneshwari
informed decisions. Jolad,(13 April 2025),”Brain Stroke Detection Using
REFERENCES Deep Learning Approaches”,
[Link]
[1] Sathya Sundaram. M,Pavithra. K,Poojasree. V (June 3358-6_42.
2022),”STROKE PREDICTION USING MACHINE
LEARNING”, International Advanced Research Journal [10] Kallam, B. & Shaik, A. (2022). Brain stroke
in Science, Engineering and Technology Vol 9 Issue 6, prediction using supervised machine [11] Kallam, B. &
[Link] Shaik, A. (2022). Brain stroke prediction using
supervised machine learning. International Journal of
[2] Shehzada Mushtaq, Kamaljit Singh Saini, Saimul Creative Research Thoughts, 10(6):a371-a374.
Bashir (June),”Machine Learning for Brain [Link] .
StrokePrediction”, 2023 InternationalConference,
[Link] [11] Gupta, P., & Verma, A. (2024). Multi-Disease
Prediction System with Voice-based Input Using
[3] .K. D. Mohana Sundaram, G. Haritha,A. Streamlit and Machine Learning. AI in Healthcare, 14(1),
Abhilash(Volume 8 ~ Issue 4 (2022)),”Detection of Brain 33–45
Stroke Using Machine Learning Algorithm”,
[Link]. [12] Rebouc¸as ES, Marques RCP, Braga AM, Oliveira
SAF, deAlbuquerque VHC, Filho PPR (2018) New level
[4] Jarapala Parvathi, Saikiran Ellambotla(VOL. 12 NO. set approach based on Parzen estimation for stroke
4 (2024)),”Machine Learning based Brain Stroke segmentation in skull CT images. Soft Comput.
Prediction using Light Gradient Boosting Machine [Link]
Algorithm.
[Link] [13] A. Sudha, P. Gayathri, and N. Jaisankar, "Effective
analysis and predictive model of stroke disease using
[5] Nnanna Chidera Egegamuka, Nnanna Ekedebe,April classification methods, "International Journal of
2024International Journal of Innovative Science and Computer Applications, vol. 43, no. 14, pp. 26– 31, 2012.
Research Technology 9(4):2783- 2795,”Development of
Random Forest Model for Stroke Prediction”, [14] Yadav, A., & Rao, D. V. (2023). Fake News
[Link] Detection Using Naive Bayes Classifier: A Comparative
OI:10.38124/ijisrt/IJI SRT24APR2566. Study. Journal of Management
[Link]
[6] Carlos Fernandez-Lozano,Pablo Hervella,Ramón
22.
Iglesias-Rey ,Article Number: 10071 (12 May
2021),”Random forest-based prediction of stroke [15] Saadi, S. M., & Al-Jawher, W. A. M. (2023). Image
Outcome”, [Link] Fake News Prediction Based on Random Forest Gradient-
89434-7. [Link]://[Link]/i
asj/download/01257e0b0f4e1.

© 2025, IJSREM | [Link] DOI: 10.55041/IJSREM46323 | Page 5

You might also like