CARDIOVASCULAR DISEASE PREDICTION USING GENETIC ALGORITHM

Page 1

International Research Journal of Engineering and Technology (IRJET) e-ISSN:2395-0056

Volume: 09 Issue: 09 | Sep 2022 www.irjet.net p-ISSN:2395-0072

CARDIOVASCULAR DISEASE PREDICTION USING GENETIC ALGORITHM

ABSTRACT

:

Cardiovasculardiseasesarethosediseasesthatrelatedtoheart Heartdiseasesarenotshorttermdiseaseslikefeverorcold Theytakeyearsoftimetodiagnoseandarehardtodetectandpredictbasedonsymptoms.Itisamajorcauseofmorbidity andtransienceinthemodernsociety.Diagnosisofcardiovasculardiseaseusingvarious medicaltestsisanimportantbut complicatedtaskwhichshouldbeperformedaccurately.Ifthereareanyerrorsormistakesinthosepredictions,thelifeof patientmightbeindanger.HenceaPowerfultoolinthepredictionofheartdiseasewithlowercosthasBecometheneedof time. Detection of such cardiovascular i.e heart diseases might be done with the help of some common symptoms like regular illness or even bepredictedusingrisk factors such as age,familyhistorydiabetes ,hypertension ,highcholesterol, tobaccosmoking,alcoholintake,obesityorphysicalin-activity,etc.

Averyscarcenumberofthesystems predictheartdiseasesbasedontheseriskfactors.Heart disease patients have lot of these visible risk Factors in common which can be used very effectively for diagnosis. System based on such risk factors would not onlyhelp medical Professionals but it would give patients a warning about the probable Presence of heart diseaseevenbeforehevisitsahospital.Inthis,wewillApplyANNandbinaryclassificationtothedatasetwhichisnothing buttheriskfactors,forPredictionandtrainingofnetwork

Key words: Cardiovascular diseases, genetic algorithm, neuro adaptive capability,ANN , Binary classification

1. INTRODUCTION:

In medical diagnosis, the information provided by the patients may Include redundantand interrelated symptoms and signs especially when the patients suffer from more than one type of disease of same category. The physicians may not able to diagnose itcorrectly. So it is necessary to identify the important diagnostic features of a disease and this may facilitate the physicians to diagnose the disease early and correctly. Genetic algorithms are commonly used for better solutionduetoitsoperatorslikeselection,crossoverandmutation.Accurateandreliabledecisionmakingincardiological prognosis can help in the planning of suitable surgery and therapy, and generally, improvepatient management through thedifferentstagesofthedisease.

Prediction of diseases isn’t an easy task to perform. We might even need more than one soft computing and machine learning,dataminingtechniquestounderstandthesituationandpredict.

The proposed problem thus obviously is related to unawareness among people and their resulting disregard for proper medical care especially related to cardio-logical problems. Thus this system aims to spread awareness among people by accurately predicting if they are at a potential risk of contracting a heart disease and thereby makethem pro-active In making healthier life choices and follow regular check ups .Our main aim in this review is to develop a heart disease predictionsystem,checkitsaccuracyandverifyifitisoptimalusinggeneticalgorithmandcomparewithanANNtoverifyif thesolutionprovidedbyGeneticalgorithmisok.

© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page1372
***
Ghanashyam Vagale, Nikhil Gupta, Siddharth Mittal, Deepti Botlaguduru, Hardique Dasore, Ashee Kanungo

International Research Journal of Engineering and Technology (IRJET) e-ISSN:2395-0056

Volume: 09 Issue: 09 | Sep 2022 www.irjet.net p-ISSN:2395-0072

©
Page1373
2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal |
Architecture a) For genetic algorithm: b) Genetic algorithm general architecture : Heart disease prediction system (Using genetic algorithm) User’s Output User input
2) General

International Research Journal of Engineering and Technology (IRJET) e-ISSN:2395-0056

Volume: 09 Issue: 09 | Sep 2022 www.irjet.net p-ISSN:2395-0072

3)Dataset

specification:

Heart dataset: About dataset: Data Set Characteristics: Multivariate Number of Instances: 303 Area: Life Attribute Characteristics: Categorical, Integer,Real Number of Attributes: 75 Date Donated 1988-07-01 Associated Tasks: Classification Missing Values? Yes Number ofWeb Hits: 1469955

1. SYSTEM DESIGN

© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page1374
1.1. Architecture Diagram / Flow Diagram / Flowchart

International Research Journal of Engineering and Technology (IRJET) e-ISSN:2395-0056

Volume: 09 Issue: 09 | Sep 2022 www.irjet.net p-ISSN:2395-0072

System architecture:

5.2 Detailed Description of Modules

Patient database: Generallyinhospitalscertainpatientdatabasesaremaintainedforfutureuse.Weareusingthatdataas ourdatasetfromKagglewebsite.Thisdataisthemainsourceofourprojectandwiththehelpofdatabasewewillperform alltheotheroperationsintheflowchart.

Pre-processing: We have two types of attributes in the database; primary attributes(more important) and secondary attributes(lessimportant).Throughpre-processingwewillrefinethedatabyseparatingmoreimportantattributesfrom lessone.

Tokenization: It is the process of turning sensitive data into non-sensitive data called"tokens" that can be used in a databaseorinternalsystemwithoutbringingitinto scope.Tokenizationcanbeusedtosecuresensitivedatabyreplacing theoriginaldatawithanunrelatedvalueofthesamelengthandformat.Wewillreplacethefuzzyvaluesofthedata ascrisp valuesandchangethedataintobitstringssothatthedatacanbeeasilyusedingeneticalgorithm.

Training the model: Training of the model is done by artificial neural network in which we will perform updation of weightswiththehelpofoldweightspresentindatabase.Thenbyusingthresholdvalueandactivationfunctionaccording tothedataobtainedwewillcompareandprovidetheoutputandupdatedweightsasresults.

Testing the model: Testing the gained results provide the accuracy of the model. Weare performing testing through genetic algorithm as the best fitted chromosomes survives and the least fitted will be dead. This mechanism gives the performance of the model. The decision variable ‘x’ is coded into finite length string and initial population is selected randomly.

Designing fitness of genetic algorithm: Fitness Function(also known astheEvaluationFunction)evaluateshow closeagivensolutionistotheoptimumsolutionofthedesiredproblem.Itdetermineshowfitasolutionis.Then‘x’values aredecodedforinitialpopulation.

Applying genetic algorithm: Here genetic algorithm comes into action. Genetic Algorithm (GA) is a search-based optimization technique based on the principles of Genetics and Natural Selection. It is frequently used to find optimal or near-optimal solutions to difficult problems which otherwise would take a lifetime to solve. The subtasks of genetic algorithmlikeproducingchildchromosomesfromparentchromosomesisdoneby“crossover”and“mutation”techniques.

© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page1375

International Research Journal of Engineering and Technology (IRJET) e-ISSN:2395-0056

Volume: 09 Issue: 09 | Sep 2022 www.irjet.net p-ISSN:2395-0072

Collection of results: Aftercrossoverandmutationwewill get bestscoreofthechildchromosomesandmatchedagainst theirrespectedparentfitnessscore.Ifthe child’s scoreisgreaterthanparentsthenchildisbestfittedanditcanproceed forfurthersurvival,otherwisewehavetorepeatfromtestingmoduleagaintillwegetthebestscore.

Prediction of heart disease: Withthehelpofartificialneuralnetworkandgeneticalgorithmwecanpredicttheaccuracy of the model. Genetic based neural network is used for training the system. The final weights of the neural network are storedintheweightbaseandareusedforpredictingtheriskofcardiovasculardisease.Theclassificationaccuracyobtained usingthisapproachis81.3%.

2. SOFTWARE REQUIREMENTS SPECIFICATION

The code of genetic algorithm and artificial neural networks is in python programminglanguage. We have used Jupyter notebookplatformforwritingandexecutingthecode.Installing the latest Jupyter notebook on updated Windows 10 will help us importing new libraries. Jupyter is a project and community whose goal is to "develop open- source software, open-standards,andservicesforinteractivecomputingacrossdozensofprogramminglanguages".

2.1. Output :

1. Data import and pre-processing :

Fig1:ImportingthedatafromtheKagglewebsitewith303rowsx14columns

2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page1376

©

International Research Journal of Engineering and Technology (IRJET) e-ISSN:2395-0056

Volume: 09 Issue: 09 | Sep 2022 www.irjet.net p-ISSN:2395-0072

Fig2:removingthemissingdatafromthetable

Fig3:DroppingtherowswithNaNvaluesfromthetable

© 2022, IRJET | Impact
7.529 | ISO 9001:2008 Certified Journal | Page1377
Factor value:

International Research Journal of Engineering and Technology (IRJET) e-ISSN:2395-0056

Volume: 09 Issue: 09 | Sep 2022 www.irjet.net p-ISSN:2395-0072

2. Data visualization :

Fig4:AfterremovingmissingandNaNvaluesfromthetable

©
Journal | Page1378
2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified

International Research Journal of Engineering and Technology (IRJET) e-ISSN:2395-0056

Volume: 09 Issue: 09 | Sep 2022 www.irjet.net p-ISSN:2395-0072

Fig5:Histogramsofeveryattributeinthedata

Fig6:Heartdiseasefrequencyforageswithtargets-0,1

© 2022, IRJET | Impact Factor
7.529 | ISO 9001:2008 Certified Journal | Page1379
value:

International Research Journal of Engineering and Technology (IRJET) e-ISSN:2395-0056

Volume: 09 Issue: 09 | Sep 2022 www.irjet.net p-ISSN:2395-0072

Fig7:Matrixrepresentationoflineardatawithitsownattributes

3. Training and Testing

Fig8:TrainingthedatausingANNalgorithm-only80%dataisused

© 2022, IRJET | Impact Factor
7.529 | ISO 9001:2008 Certified Journal | Page1380
value:

International Research Journal of Engineering and Technology (IRJET) e-ISSN:2395-0056

Volume: 09 Issue: 09 | Sep 2022 www.irjet.net p-ISSN:2395-0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page1381

Fig9:Testingthedatawithaccuracyandloss-20%ofdataisused

International Research Journal of Engineering and Technology (IRJET) e-ISSN:2395-0056

Volume: 09 Issue: 09 | Sep 2022 www.irjet.net p-ISSN:2395-0072

Fig10:ModellossgraphforANN

Fig11:ModelaccuracygraphforANN

©
2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page1382

International Research Journal of Engineering and Technology (IRJET) e-ISSN:2395-0056

Volume: 09 Issue: 09 | Sep 2022 www.irjet.net p-ISSN:2395-0072

Fig12:Trainingofdatawithbinaryclassificationalgorithm

Fig13:Testingofdatawithbinaryclassificationalgorithm

©
2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page1383

International Research Journal of Engineering and Technology (IRJET) e-ISSN:2395-0056

Volume: 09 Issue: 09 | Sep 2022 www.irjet.net p-ISSN:2395-0072

Fig14:Modelaccuracygraphforbinaryclassification

Fig15:Modellossgraphforbinaryclassification

©
2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page1384

International Research Journal of Engineering and Technology (IRJET) e-ISSN:2395-0056

4. Genetic Algorithm (GA)

Fig16:Initializingpopulationandcalculatingfitnessscoreofparentchromosomes

Fig17:Selectingparentchromosomesusingfitnessscoreandperformingcrossover

Volume: 09 Issue: 09 | Sep 2022 www.irjet.net p-ISSN:2395-0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page1385

International Research Journal of Engineering and Technology (IRJET) e-ISSN:2395-0056

Volume: 09 Issue: 09 | Sep 2022 www.irjet.net p-ISSN:2395-0072

Fig18:Performingmutationandgettingchildrenchromosomes

© 2022, IRJET | Impact
7.529 | ISO 9001:2008 Certified Journal | Page1386
Factor value:

International Research Journal of Engineering and Technology (IRJET) e-ISSN:2395-0056

5. Final Results :

Fig19:Calculatingbestscoreofchildrenchromosome

Fig20:MetricsofANNalgorithmforpredictingheartdisease

Volume: 09 Issue: 09 | Sep 2022 www.irjet.net p-ISSN:2395-0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page1387

International Research Journal of Engineering and Technology (IRJET) e-ISSN:2395-0056

Fig21:Metricsofbinaryclassificationalgorithmforpredictingheartdisease

8. REFERENCES

Volume: 09 Issue: 09 | Sep 2022 www.irjet.net p-ISSN:2395-0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page1388

[1] Reddi, Sivaranjani & srinivasa naresh, Vankamamidi & Murthy, Nistala V.E.S.. (2019). Coronary Heart Diseasepredictionusinggeneticalgorithmbaseddecisiontree.10.1515/9783110621105-004.

[2] Gadekallu, Thippa & Reddy, Praveen & Lakshman, Kuruva & Rajput, Dharmendra& Kaluri, Rajesh & Srivastava, Gautam. (2020). Hybrid genetic algorithm and a fuzzy logic classifier for heart disease diagnosis. EvolutionaryIntelligence.13.10.1007/s12065-019-00327-1.

[3] Bano,Shaikh.(2019).HeartDiseasePredictionSystemusingGeneticAlgorithm.InternationalJournalfor ResearchinAppliedScienceandEngineeringTechnology.7.2178-2182.10.22214/ijraset.2019.6366.

[4] Kumkum Chaudhary, Radhika Naidu, Rhea Rai, Narendra Gawai. (2019). HybridArchitecture of Heart Disease Prediction System using Genetic Neural Network. V6/i5/IRJET-V6I5857

[5] Uyar, Kaan & Ilhan, Ahmet. (2017). Diagnosis of heart disease using genetic algorithm based trained recurrentfuzzyneuralnetworks.ProcediaComputerScience.120.588-593.10.1016/j.procs.2017.11.283.

[6] Awan, Shahid & Riaz, Muhammad & Khan, Abdul. (2018). PREDICTION OF HEART DISEASE USING ARTIFICIALNEURALNETWORK.13.102-112.

[7] Prasadgouda B Patil, Dr. P Mallikarjun Shastry, Dr Ashokumar P S. (2020). A Novel Approach for PredictionofCardioVascularDisease:AnImprovedGeneticAlgorithmApproachUsingClassifiers.InternationalJournal ofAdvancedScienceandTechnology,29(7s),4493–4504.

[8] Srikanth Meda1 , Raveendra Babu Bhogapathi 2 1 Research scholar, Acharya Nagarjuna University, Guntur & Associate Professor in the Department of Computer Science and Engineering at R.V.R. & J.C. College of Engineering,Guntur522019,India2Professor,DepartmentofComputerScienceandEngineering,R.V.R&J.CCollegeof Engineering,Guntur552019,India

International Research Journal of Engineering and Technology (IRJET) e-ISSN:2395-0056

Volume: 09 Issue: 09 | Sep 2022 www.irjet.net p-ISSN:2395-0072

[9] Akruti Dave, Prof. Gayatri Pandi , Master of Engineering Student, Head of Department Department of ComputerEngineering,L.JInstituteofEngineering&Technology(GujaratTechnologicalUniversity),Ahmedabad,India

[10] Kasbe,Tanmay&Pippal,Ravi.(2017).Designofheartdiseasediagnosissystemusingfuzzylogic.31833187.10.1109/ICECDS.2017.8390044.

[11] Zeinab Arabasadi , Roohallah Alizadehsani , Mohamad Roshanzamir , Hossein Moosaei , Ali Asghar Yarifard,Computeraideddecisionmakingforheartdiseasedetectionusinghybridneuralnetwork-Geneticalgorithm, ComputerMethodsandProgramsinBiomedicine,Volume141,2017,Pages19-26,ISSN0169-2607.

[12] Zabeen, Ashiya & Utsav, Ankur & Lal, Kanhaiya. (2018). Detection of Heart Disease Applying Fuzzy LogicsandItsComparisonwithNeuralNetworks.461-467.10.1109/RTEICT42901.2018.9012315.

[13] Kumar, S., & Sahoo, G. (2018). Enhanced decision tree algorithm using genetic algorithm for heart diseaseprediction.InternationalJournalofBioinformaticsResearchandApplications,14(1-2),49-69.

[14] Nikam,S.,Shukla,P.,&Shah,M.(2017).Cardiovasculardiseaseprediction usinggeneticalgorithmand neuro-fuzzysystem.

[15] http://www.ijareeie.com/upload/2016/rapideet/20_PP_RE1145_NEW.pdf

[16] Kumar,P.S.,Anand,D.,Kumar,V.U.,Bhattacharyya,D.,&Kim,T.H.(2016).Acomputationalintelligence method for effective diagnosis of heart disease using genetic algorithm. International Journal of Bio-Science and BioTechnology,8(2),363-372.

[17] Salem, T. (2018). Study and analysis of prediction model for heart disease: an optimization approach usinggeneticalgorithm.InternationalJournalofPureandAppliedMathematics,119(16),5323-5336.

[18] Santhanam, T., & Ephzibah, E. P. (2015). Heart disease prediction using hybrid genetic fuzzy model. IndianJournalofScienceandTechnology,8(9),797.

© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page1389

Turn static files into dynamic content formats.

Create a flipbook