Health Care Application using Machine Learning and Deep Learning

Page 1

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

Volume: 09 Issue: 06 | Jun 2022 www.irjet.net p ISSN: 2395 0072

Health Care Application using Machine Learning and Deep Learning

Department of Computer Science and Engineering, MIT School of Engineering, MIT Art, Design and Technology University, Pune 412201, India ***

Abstract Machine learning techniques are widely used in a variety of fields, and the healthcareindustry,inparticular,has benefited greatly from machine learning prediction methods. Because disease prediction is a difficult task, it is necessary to automate the process in order to avoid the risks associated with it and to alert the patient ahead of time. Doctors require precise predictions of their patients' disease outcomes. Furthermore, timing is a significant factor that influences treatment decisions for accurate predictions. Early disease prediction has become an important task. However, doctors find it difficult to make accurate predictions based on symptoms. The most difficult task is correctly predicting disease. Machine learning is being used more and more in the field of medical diagnosis. This can be attributed primarily to advancements in disease classification and recognition systems, which can provide data that aids medical experts in the early detection of fatal diseases, thereby significantly increasing patient survival rates. In this paper, we present an intelligent healthcareapplicationthatcanpredictandprovide information on various diseases.

Artificial Intelligence (AI) has recently become popular in medicine and the healthcare industry. AI has made computers smarter and capable of thinking. Machine learningisconsideredasubfieldofAIinnumerousresearch studies.

1.1 Machine Learning (ML)

Machinelearningtechniquesarewidelyappliedinvarious fields,andthehealthcaresector,inparticular,hasbenefited greatly from machine learning prediction techniques. Its goals include correctly predicting diseases, improving medical treatment, and improving clinical outcomes. In medicalapplications,machinelearningalgorithmscanhelp doctors make better treatment decisions for patients by utilizing an effective healthcare system. This may be attributedmostlytoadvancementsindiseaseclassification andidentificationsystems,whichcangivedatathatsupports medicalspecialistsintheearlydiscoveryoflethaldiseases, resultinginaconsiderableriseinpatientsurvivalrates.

Words: Machine Learning, Deep Learning, AI, Healthcare,DiseasePrediction

1. INTRODUCTION

Health care is widely recognized as an important determinantinpromotingpeople'soverallphysical,mental, and social well being, and it can add significantly to a nation'seconomy,development,andindustrialization.Some people don't get the necessary health care they require becausetheydonothavehealthinsuranceorbecausethey livetoofarawayfromproviders whoprovidethem.More peoplecan getthecarethey need if initiatives toincrease access to health care services are implemented, such as lowering costs, increasing the use of telehealth, and improvinginsurancecoverage.

Healthcareisoneofthefastest growingindustriesintoday's economy; more people need care, and it's getting more expensive.Governmentspendingonhealthcarehasreached an all time high, despite the obvious need for improved patient physicianinteraction.Bigdataandmachinelearning technologieshavethepotentialtobenefitbothpatientsand providersintermsofbettercareandlowercosts[1] Doctors believethattimeisakeyelementindiagnosis,andarriving atasuitableconclusioninatimelymannermaysignificantly benefit patients. As a result, accurate patient outcome predictionisanissueinhealthcare.

Machine Learning: the classic definition is A computer programissaidtolearnfromexperienceEwithrespectto some class of tasks T and performance measure P, if its performanceattasksinT,asmeasuredbyP,improveswith experienceE[2].

Fig 1:MachineLearningTypes

Machine Learning Algorithms:

LogisticRegression

Logistic Regression is a classification process for determiningtheprobabilityofaneventoccurringornot.Itis usedtorepresentabinaryorcategoricaloutcomethathas onlytwoclasses.Itisidenticaltolinearregression,withthe exceptionthatthevariable'sresultiscategoricalratherthan continuous.Forprediction,itusestheLogitLink function, whichfitsthedatavalues.

©
Journal | Page959
2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified
Ajinkya Padule1 , Aman Patel2 , Arsalan Patel3 , Aman Shaikh4 , Jyoti Gavhane5

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

Volume: 09 Issue: 06 | Jun 2022 www.irjet.net p ISSN: 2395 0072

DecisionTree

The Decision tree is a machine learning approach that is used for both classification and regression analysis. It is identicaltothetreeanalogyinreallife.It'satree likegraph thatstartswithasinglenodeandbranchesouttoallofthe outcomes. A decision tree, unlike linear models, is supervised learning that maps non linear relationships as well. 

RandomForest

Arandomforestisacollectionofmultipledecisiontrees.The randomforestclassifierisessentiallyacollectionofdecision treeclassifiers,eachofwhichisbuiltusingseveralrandom vectorsandcanvoteforthemostfavoredpredictionclass. Theadditionofrandomizationtothemodelpreventsitfrom overfitting,resultinginimprovedclassificationresults. 

SupportVectorMachines(SVM)

Support Vector Machines, also known as Support Vector Networks, are supervised learning algorithms that can be used for regression and classification problems. It uses parallel lines called the hyperplane to divide data points plotted in a multidimensional space into categories. The maximizationof the margin between the hyperplane is requiredfordatapointclassification.

1.2 Deep Learning (DL)

Deep learning is a type of machine learning and artificial intelligence(AI)thatcloselyresembleshowhumansacquire specific types of knowledge. It uses artificial neural networks,whicharedesignedtoimitatehowhumansthink and learn, as compared to machine learning, which uses simplerconcepts.Aweightedandbias correctedinputvalue ispassedthrough a non linearactivationfunctionsuch as ReLuandsoftmaxtogenerateanoutputinatraditionalDeep NeuralNetwork(DNN).[20]Asaresult,thegoaloftraininga DNN is to optimizethe network's weights in order to minimizethelossfunction.[3]

Convolutional Neural Network (CNN):

A Convolutional Neural Network, or CNN, is a type of artificialneuralnetworkusedforimage/objectrecognition and classification in Deep Learning. Using CNN, Deep Learningidentifiesobjectsinanimage.ACNNiscomprised ofthreemajorlayers:convolutionlayer,poolinglayer,and fullyconnectedlayer.

Fig 2:CNNArchitecture

Transfer Learning:

Transfer learning is a process in which a model trained on one problem is used in some way on anotherrelatedproblem. 

Transfer learning is a deep learning technique in whichaneuralnetworkmodelisfirsttrainedona problemsimilartotheonebeingsolved. 

Transfer learning reduces the training time for a neural network model and can lead to lower generalizationerror.

VGG16:

Convolution layers of 3x3 filters with stride 1 and always usedthesamepaddingandmaxpoollayerof2x2filterswith stride2.The16inVGG16referstoithaving 16weighted layers.Thisnetworkisquitelarge,withapproximately138 million(approx)parameters.

VGG16isaconvolutionalneuralnetworkarchitecturewhich stands for Visual Geometry Group and it is also known as OxfordNet. It was proposed in the paper “Very Deep ConvolutionalNetworksforLarge ScaleImageRecognition” by Karen Simonyan and Andrew Zisserman from the UniversityofOxford.

Fig 3:VGG16Architecture

©
Journal | Page960
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: 06 | Jun 2022 www.irjet.net p ISSN: 2395 0072

2. Literature Survey

ApurbRajdhan[4]andothersintheirpaperappliedvarious MLalgosforpredictionofheartdiseaseusingUCImachine learningrepositorydataset.AlgosusedwereDecisionTree, LogisticRegression,RandomForestandNaiveBayes.Outof whichRFgavehighestaccuracyof90.16%.

The authors [5] in their paper have build a web based application for heart disease prediction. They used UCI datasetobtainedfromUniversityofCalifornia,Irvine.They usedSVM,LRandNBalgosandSVMwasmoreaccuratethan othertwowith64.4%accuracy.

In[6],Mujumdarandotherauthors,theyusedvariousML Algos for diabetes prediction. LR gave highest accuracyof 96%.

In this, authors have used PIMA Indians diabetes dataset from UCI. They analyzed both ML and DL Algos for predictionofdiabetess.TheresultsofRFwasmoreefficient whichgaveaccuracyof83.67%.[7]

Theauthorsof[8]useddatasetfromUCIMLReposiory.In addition original dataset was collected from northeast of AndhraPradesh, India.Forliverdiseaseprediction,they used 6 ML algos. And in terms of accuracy, LR achieved highestaccuracyof75%

Inthis,theyusedNaïveBaiyesandSVMalgorithmsforliver diseaseprediction.From the experimental results,the SVM classifier is considered as a bestalgorithmbecauseofits highestclassificationaccuracy.Onthe other hand, while comparing the execution time, theNaïveBayesclassifier needs minimum execution time Dataset used was Indian LiverPatientDataset(ILPD).[9]

Inthis paper,a deeplearningalgorithmwasdeveloped to accuratelypredictMalariainashortamountoftime.Three CNN models were built, with the highest accuracy model beingchosen.IncomparisontootherCNNmodels,theFine TunedCNNhadahighaccuracyrate.[10]

ThedatasetusedwasobtainedfromtheUSNationalLibrary of Medicine in theand contains 27,558 cell pictures. They usedtheCNNtechniqueandachieved95%accuracy.[11]

In[12],theauthorshavepredictedPneumoniadiseaseand used the dataset provided by Guangzhou Women and Children’s Medical Center Guangzhou which is openly availableonKaggleandhas5856imagesofchestX ray They used grayscale images of size 200*200 pixels. Data augumentationwasperformedonthedatasetforbalancing thedataset.Achievedaccuracyof88.90%.

3. Proposed System

Thissectionexplainsthemethods,algorithms,andsystem architecture that we used to develop our application. We builda web based applicationthat predictsthedisease In thisstudy,wehaveusedMLandDLalgorithmstocreatea healthcaresystemtopredictdifferentdiseases.Thediseases forwhichweproposedoursystemareDiabetes,Heart,Liver, Malaria,andPneumonia.Outofwhich,forDiabetes,Heart, andLiver,weusedMLandforMalariaandPneumonia,we usedDL.Theproposedworkpredictsdiseasesbyexploring the ML algorithms and doing performance analysis. The objectiveofthisstudyistoeffectivelypredictifthepatient suffersfromthedisease.Theinputvaluesfromthepatient's healthreportareenteredbytheuser.Thedataisfedintothe ML model which predicts the probability of having the disease.

Fig 4:ModelFileGeneration

WehavedividedthemodeltrainingintoMLtrainingandDL trainingforbetterunderstanding.

ML Training:

Datasets for Diabetes, Heart and Liver diseases were collectedfromUCIMachineLearningReposioryinComma Seperated Values (CSV) format. After collecting data, we

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

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

Volume: 09 Issue: 06 | Jun 2022 www.irjet.net p ISSN: 2395 0072

performed some data preprocessing on that data like cleaning data, normalizing, standardizing, handling null values.Thenwesplitthedatasetintotrainingandtesting. 80% of the data was used for training the model and the remaining20%wasusedfortestingthemodel

Trainingdatasetisthedatasetwhichisusedtotrainamodel. Testing dataset is used to check the performance of the trainedmodel.

Fortrainingthemodelfiles,weusedvariousMLalgos.We used Logistic Regression, Random Forest, SVM, Decision Tree.Allthesealgoswereappliedtoeverydiseasedataset andweevaluatedtheiraccuracies.Foreachofthealgorithms theperformanceiscomputedandanalyzed.

DL Training:

For Malaria disease, we have used Malaria Cell Images Dataset dataset from Kaggle and for Pneumonia, we have usedChestX RayImages(Pneumonia)datasetfromKaggle. We applied some preprocessing on the images such as rescale,zoomrange,shearrange,horizontalflip,etc.Image size was 224*224. We used 27581 training data and 525 testingdataformalariadiseaseand5216trainingdataand 624 testing data for pneumonia disease. We have applied transferlearninghere.VGG16withweightsinitializedwith imagenet was used. Then we trained our model for 25 epochs

System Architecture:

Fig 5:SystemArchitecture

touploadtheimage.Thentheresultsfromthebackendare displayedonthefrontend.Andifthepersonisaffected,then the system displays the details of that disease which will helpin diagnosis andunderstanding oftheseverityofthe disease.

Fig 6:Output1 HomeScreen

Front End:

Front EndiswhatwecallUser Interface.Itrepresentshow theuserinteractswiththesystem.Foroursystem,wehave used HTML CSS Javascript. HTML(HyperText Markup Language) is said to be the skeleton, CSS(Cascading Style Sheets)isconsideredthebody,andJavascriptisthebrainof thedesignsystem.

Theuserisrequiredtoinputthedetailsofthepatientdata throughthefront endwhichpassesthisdatatothebackend where the prediction takes place. For diabetes, heart, and liver,thefrontendprovidestheinputfieldtoenterthevalues andformalariaandpneumonia,thefrontendallowstheuser

Fig 7:Output2 InputPatientDetails

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

©
Page962

International Research Journal of Engineering and Technology (IRJET)

e ISSN: 2395 0056

Volume: 09 Issue: 06 | Jun 2022 www.irjet.net p ISSN: 2395 0072

Table 1: Diabetes,HeartandLiverDiseasesAccuracies Disease Algorithm Accuracy

Diabetes

LogisticRegression 81.01 Random Forest 84.81 SVM 81

DecisionTree 75.95 Heart Logistic Regression 80.26 RandomForest 72.36 SVM 81.57

DecisionTree 61.84

Fig - 8:Output3 InputPatientImage

Fig 9:Output4 DiseasePredictionOutputScreen

Back end:

Thebackendiswherethelogicgetsexecuted.Itoperatesin the background of the system. The framework which we have used to develop our application is flask which is programmedusingpython.Pythonisalsousedforthemodel filesgeneration.

Forthedeploymentofourapplication,wehaveusedHeroku.

4. Results:

This section will discuss the outcomes of the proposed system.

TheresultsobtainedbyapplyingRandomForest,Decision Tree,SVMandLogisticRegressionareshowninthissection

Liver LogisticRegression 65.5 Random Forest 83.33 SVM 66.56 DecisionTree 60.2

Afteranalyzingtheresultsobtainedfromthealgorithms,we inferred that for diabetes disease random forest classifier gave the best accuracy, for heart disease SVM performed well and gave the highest accuracy and for liver disease randomforestclassifiergavebetteraccuracy.

Table 2: BestDiseaseAccuraciesSelected Disease Algorithm Accuracy Diabetes RandomForest Classifier 84.01

Heart SVM 81.57 Liver RandomForest 83.33 Malaria VGG16 94.29 Pneumonia VGG16 95.48

5. CONCLUSIONS

With the rising number of deaths caused by various diseases,ithasbecomenecessarytodesignasystemthatcan efficientlyandreliablyanticipatediseases.Thestudy'sgoal wastodiscoverthebesteffectiveMLandDLalgorithmsfor detecting these illnesses. Using the UCI machine learning repositorydataset,thisstudyanalysestheaccuracyscoresof Decision Tree, Logistic Regression, Random Forest, SVM, VGG16 algorithms for predicting different disease. In this systemapplication,wesuccessfullypredicted5diseasesthat are Diabetes, Heart, Liver, Malaria and Pneumonia. By providingtheinputasapatientrecord,wewereabletoget

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

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

an accurate general illness risk prediction as an output, which let us understand the degree of disease risk prediction.

Thehealthcarebusinessisexperiencinggreaterdifficulties andisgrowingmorecostly.Toaddressthesedifficulties,a varietyofmachinelearninganddeeplearningmethodsare implemented. As a result, such integration should be encouragedforthesakeofhumanity'sadvancement.

REFERENCES

[1] R. Bhardwaj, A. R. Nambiar and D. Dutta, "A Study of Machine Learning in Healthcare," 2017 IEEE 41st AnnualComputerSoftwareandApplicationsConference (COMPSAC), 2017, pp. 236 241, doi: 10.1109/COMPSAC.2017.164.

[2] MachineLearning,TomMitchell,McGrawHill,1997.

[3] W.Y.B.Lim,N.C.Luong,D.T.Hoang,Y.Jiao,Y. C.Liang,Q. Yang,etal.,Federatedlearninginmobileedgenetworks: acomprehensivesurvey,IEEECommun.Surv.Tutorials (2020).

[4] Rajdhan, Apurb & Agarwal, Avi & Sai, Milan & Ghuli, Poonam. (2020). Heart Disease Prediction using MachineLearning.InternationalJournalofEngineering Researchand.V9.10.17577/IJERTV9IS040614.

[5] Jagtap,A.,Malewadkar,P.,Baswat,O.andRambade,H., 2019.Heartdiseasepredictionusingmachinelearning. International Journal of Research in Engineering, ScienceandManagement,2(2),pp.352 355.

[6] Mujumdar, Aishwarya & Vaidehi, V.. (2019). Diabetes PredictionusingMachineLearningAlgorithms.Procedia Computer Science. 165. 292 299. 10.1016/j.procs.2020.01.047.

[7] Yahyaoui, Amani & Rasheed, Jawad & Jamil, Akhtar & Yesiltepe,Mirsat.(2019).ADecisionSupportSystemfor DiabetesPredictionUsingMachineLearningandDeep Learning Techniques. 10.1109/UBMYK48245.2019.8965556

[8] Rahman, A. K. M. & Shamrat, F.M. & Tasnim, Zarrin & Roy,Joy&Hossain,Syed.(2019).AComparativeStudy OnLiverDiseasePredictionUsingSupervisedMachine LearningAlgorithms.8.419 422.

[9] Mohan, Vijayarani. (2015). Liver Disease Prediction usingSVMandNaïveBayesAlgorithms

[10] Shekar, Gautham; Revathy, S.; Goud, Ediga Karthick (2020). [IEEE 2020 4th International Conference on Trends in Electronics and Informatics (ICOEI) Tirunelveli, India (2020.6.15 2020.6.17)] 2020 4th

InternationalConferenceonTrendsinElectronicsand Informatics (ICOEI)(48184) Malaria Detection using Deep Learning. , (), 746 750. doi:10.1109/ICOEI48184.2020.9143023

[11] Sriporn,Krit&Tsai,Cheng Fa&Tsai,Chia En&Wang, Paohsi. (2020). Analyzing Malaria Disease Using EffectiveDeepLearningApproach.Diagnostics(Basel, Switzerland).10.10.3390/diagnostics10100744

[12] L. Račić,T. Popović, S. čakićand S. Šandi, "Pneumonia DetectionUsingDeepLearningBasedonConvolutional NeuralNetwork,"202125thInternationalConference on Information Technology (IT), 2021, pp. 1 4, doi: 10.1109/IT51528.2021.9390137.

[13] Ajinkya Padule , Aman Patel , Aman Shaikh , Arsalan Patel, Jyoti Gavhane, 2022, A Comparative Study on HealthCareusingMachineLearningandDeepLearning, INTERNATIONAL JOURNAL OF ENGINEERING RESEARCH&TECHNOLOGY (IJERT)Volume11,Issue 03(March2022).

[14] Aman Shaikh , Nilima Kulkarni , Aman Patel , Arsalan Patel, 2021, Intelligent Advertisement System, International Journal of innovative Research in Technology(IJIRT)Volume7,Issue8(January2021).

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

Page964

Turn static files into dynamic content formats.

Create a flipbook