Realizing an Efficient IoMT-Assisted Patient Diet Recommendation System Through Machine Learning Model

Recent studies have shown that robust diets recommended to patients by Dietician or an Artificial Intelligent automated medical diet based cloud system can increase longevity, protect against further disease, and improve the overall quality of life. However, medical personnel are yet to fully understand patient-dietician’s rationale of recommender system. This paper proposes a deep learning solution for health base medical dataset that automatically detects which food should be given to which patient base on the disease and other features like age, gender, weight, calories, protein, fat, sodium, fiber, cholesterol. This research framework is focused on implementing both machine and deep learning algorithms like, logistic regression, naive bayes, Recurrent Neural Network (RNN), Multilayer Perceptron (MLP), Gated Recurrent Units (GRU), and Long Short-Term Memory (LSTM). The medical dataset collected through the internet and hospitals consists of 30 patient’s data with 13 features of different diseases and 1000 products. Product section has 8 features set. The features of these IoMT data were analyzed and further encoded before applying deep and machine and learning-based protocols. The performance of various machine learning and deep learning techniques was carried and the result proves that LSTM technique performs better than other scheme with respect to forecasting accuracy, recall, precision, and <inline-formula> <tex-math notation="LaTeX">$F1$ </tex-math></inline-formula>-measures. We achieved 97.74% accuracy using LSTM deep learning model. Similarly 98% precision, 99% recall and <inline-formula> <tex-math notation="LaTeX">$99\%~F1$ </tex-math></inline-formula>-measure for allowed class is achieved, and for not-allowed class precision is 89%, recall score is 73% and <inline-formula> <tex-math notation="LaTeX">$F1$ </tex-math></inline-formula> Measure score is 80%.


I. INTRODUCTION
Recommendation system for patients/dieticians is a system that monitors a user (patient/dietician) in a tailored approach towards remarkable or suitable diets or food intake in large varieties of likely selections and that results in such selections as desired output [1].A recommendation system for patients/dieticians is cautiously implemented for the purpose of encouraging the patients to take nutritional supplements; diets and food which are considered better to meet the patients' health needs, taste and dietary preferences.Lately, The associate editor coordinating the review of this manuscript and approving it for publication was Wael Guibene . in terms of life saving healthy living, recommendation systems are now believed to be a probable solution that will facilitate patients' choice of food intake considering the enormous amount of accessible data interrelated to foods/recipes [2].Diverse methods towards achieving tailored and efficient recommendations have been proposed by different authors, and we will be highlighting some of these recent researches in the related works section of this paper.
Researchers [3]- [5], have proved that robust diets indeed function as preventative medicine to many patients with diseases.In Patient-Dietician based product information, following a healthy diet recommended by the dietician or an AI automated medical diet system can increase longevity, protect against further disease, and improve the overall quality of life for the patient [6].While nutritious foods boast vitamins, minerals, antioxidants, fiber, protein, and fat, all of which stimulates better healthcare and are key to ideal physical function, it can also affect the patient whose body are not tolerant to the nutritious intake due to the kind of diseases they are suffering.Furthermore, nutritional information modeling from cloud system and implementation in the diet recommendation system concerning the patients' nutritional condition, patient health assessment of food items, creates conflicting nutritional theories with the current practice.Therefore, various springs of nutritional errors need to be addressed in future food/diet-based recommendation system [7].This research motivation is to achieve and integrate a wide-ranging of nutritional theory into the internet of things (IoT) system along with creating information system of patient/userspecific nutritional measurement and methods for estimating the effectiveness of a specific nutritional model.Meanwhile, diet recommendation system and knowledge-based menu recommendation have been found to be helpful in health management and disease prevention [8].
Real time selection of healthy diet based on patients' nutritional need has been a serious issue according to researchers [3], [5], and [9].The authors [9] noted that insufficient and wrong food consumption is acknowledged to be the leading source of several health challenges and ailment.According to their study, patients rely on medicines instead of resorting to precautionary nutritional measures in food/diet intake.This is due mainly to diversity of products information about healthy diets.In order to address this issue, the authors [9] created a cloud-based recommendation model that uses ant colony algorithm similar to author [10] to create an ideal list of food that refers appropriate diets based on their pathological records and values.This method plays an important part in controlling various diseases.However, the authors failed to address the timing fragmentation of the recommendation system for diverse food consumption timing like, breakfast, lunch or dinner in a day.The study also failed to model the nutritional composition in the singular food items with peculiar reference to timing and daily nutritional requirements of users.In the present study, this problem has been taking care of by implementing the Recurrent Neural Network, Naive Bayes and Long Term Short Memory that is suitable for precision, recall and all measures for allowed and not allowed classes of products anytime of the day.
A mobile recommender application system was developed by [11].The authors combined artificial intelligence methods via a knowledge base to manage diabetic patients' nutrition according to the strategies of American Diabetes Association (ADA).In their study, a food recommendation system was developed and evaluated which reminds diabetic patients to choose healthy snacks according to their diet.Patients'/users' physical activity was among key factors considered in designing and modeling of the application.The authors calculated users' energy expenditure on the basis of physical activity level using Harries Benedict equation in order to recommend best snacks match for users based on their calorie requirement.Unfortunately, this system was designed with a focus on patients' interests and BMI rather than the patients' conditions.Other limitations of the study by [11] include the small sample size in the estimation phase and failure to include main meals.With more exact algorithms, the quality of the recommendations can be increased.
Generally, the motivation of this research is to achieve and integrate a wide-ranging nutritional theory into the IoT system in addition to creating information system of patient/user specific nutritional measurement and methods for estimating the effectiveness of a specific nutritional model In summary, the contributions of our research are as outlined; • Investigation of the inner workings of our proposed model applying the single and ensemble machine learning algorithms like naive byes and logistic regression, and deep learning classifiers like RNN, GRU and LSTM.
• Providing a comprehensive insight about how our model works under the products and patient disease specifications.
• Analyzing the behavior of our AI and deep learning mechanisms to allow a better understanding of the nature of the problem of the patients and what food they should take in at appropriate time.
• Through analysis of our machine Learning and deep learning, we showcased that different patient diseases have different recommender evidence, which might require different treatment and special care.
The rest of this paper is arranged as follows: Section II describes related works, Section III, introduce the system's materials and methods including implementation using AI, Section IV: Summaries the findings.Section V concludes the work.

II. RELATED WORKS
A personalized diet recommendation system was developed using artificial bee colony algorithm [12] for the required daily nutrition.The authors proposed a system that uses rule based reasoning and fuzzy ontology to make food and nutrition recommendations efficiently while a genetic algorithm was proposed for menu generation.Unfortunately, the system relied on Google fit Application Programming Interface (API) of the user for information regarding daily activities and energy requirement of the user.The system also relied on past disease record of the patient to make personalized diet recommendation for users implying that this system may not be suitable for users without available disease record.The foregoing poses tremendous limitations on the number of users that can benefit from the system.Clustering analysis used for diabetic patients was used in presenting a food recommendation system by the authors in [13].They proposed that food and nutrition is a key to a healthy living.However, the authors [14] instead of using long-term information for menu recommendation computed daily nutritional requirement using only the physical user information.The study also failed to present an approach that handle nutritional and preference management simultaneously.In our approach we have used both user information and product information for a short and long term scenario in making sure patients with diseases are protected.A study was performed by the authors in [15] evaluated several medicines reporting systems which is targeted at reporting medicine shortages.Their system also incorporated different registries for batch recall, and manufacturers homepages.The research concluded a high desirability to incorporate dietetic and nutritional that are clinically used in registries to keep medical data.In the present study, we have used python to gather data and performed Machine Learning on the products.We have also addressed the peculiar dietary/nutritional needs of an individual patient via a registry base alerting system by an AI automatic system notification.
A new approach for recommending healthy diet using predictive data mining algorithm was proposed by [16].The study developed a data mining model that propose healthy food habits and eating patterns for users to know the number of calories burned, the intake of macronutrients and so on.The patient diet recommendation system models users' peculiar diet/nutritional preferences based on individual eating habits and body statistics.Although this study is effective in predicting healthy diets for patients and nutritionists/doctors, however, the drawback is that it is void of a flexible model and achieves minimal designing solutions per patient's need.In our model, we address this issue with a better LSTM method that delivers patient needs with accurate precision.
In another study, a nutrition assistance system was developed by [17], the system gives feedback on a patient's dietary behavior and accommodates behavior change through diverse persuasive elements such as self-monitoring, personalization, and reflection implementation, recommendations or tracking.Whereas an automated food/diet recommendation system could provide great benefits when compared to human nutritionists, it also faces a number of limitations ranging from usability, efficiency, efficacy to satisfaction.The results notwithstanding, there is a need to integrate contextual and social information as well as enhance the accuracy of the received input data.The system developed by [17] need be improved according to the given feedback so as to achieve desired effect in the long term as a mobile platform application for daily use.In the present study, we have good satisfaction rate of our proposal.The authors in [18] have a system that cannot be applied in food/diet recommendation.However, the delinearization of their system to fire alerts early and make possible dietary/food recommendations to patients would add additional realism as well as bridge a research gap.This is one of the contributions of the present paper.This is also similar to [19] where the authors proposed a Diet Organizer System.They created a profile using a real-time dynamic survey which the medical doctors prepared and which was users-compiled.The system which is referred as DIETOS is capable of recommending not just specific foods in the same category and which has similar health grade, but also can provide nutritional related suggestions to some category of health issues.Our system was far better because we cover more health conditions than they did while the authors in [20] collected data from individuals and predicted their health statutes using a deep neural network model known as DeepFog but failed to remodel their system for specific application, development and possible deployment in diet/food recommender system for patients with health challenges.
Recently, the technology of deep learning has been incorporated in several systems of recommendations.The authors in [21], [22] describes basic vocabularies of recommender systems and deep learning technology and a different approach in coming up with recommendation which to them is the most efficient and direct way of finding and evaluating content recommendation.Meanwhile, lack of Health knowledge makes it difficult for Patients to recover demanded information about their health, product to choose from a well-known Online Health Communities (OHC) which the authors in [23] designed and proves to be a good approach and real in determining patients interest during online conversations.In the present system, automating our model advanced this proposer.There are other Recommender models which make use of different algorithms in providing both products or services to users as proposed by [24] without proper data analysis.The same complained by authors [25], [26], who argued that medical sector still lag behind in using big data analytic.They went ahead to proposed five approaches for healthcare establishments which considers implementing the big data analytic technologies.While a hardware device proposed and implemented by [27] has the capacity to assemble huge quantity of data for processed product and further analysis assimilate them into the cloud base which would eventually benefit users in obtaining diet/food recommendations.Furthermore, several techniques for projecting a social media for healthcare data as a heterogeneous healthcare information network were also proposed by [28].Their experiment shows operational approaches outperform the approaches that are based on contents for dynamic users.
Alian et al. [29], clarifies that a system should be intelligent enough to be able to predict a physical health condition of patients, their social activities and records.They used Restricted Boltzmann Machine (RBM)-Convolutional Neural Network (CNN) deep learning approach, to provide an understanding of the big data analytics application towards the execution of an active engine of health recommender system.While Fidan et al. [30] integrated the user-based ontological AI profile with a wide-ranging scientific experimental diabetes for personalized recommendations based on geographical status, cultural, distinct socioeconomic, and predominantly to AI-based patients.This is quite different from our own AI model.Meanwhile, the patients' attitude is also important according to [31] but the most important is Transparency and Traceability in food supply chain as to determine which product is suitable for the patient and choice of food to prevent poisoning [32], [33], [35], [35].Certainly, the resultant effect of busy life styled-patients may assume unhealthy diets.Intelligent Nutrition in Healthcare, Nourishment recommendation framework for children and diet recommendation based on user information were also discussed [36]- [38].
In summary, we have reviewed various existing papers and found out the lacunas in the existing systems.In our proposed system, an efficient recommendation system for patient-dietician based product information, where an artificial intelligence based solution using a medical dataset will automatically detect which food should be given to which patient base on the patient disease and other features are also considered like age, gender, weight, calories, protein, fat, sodium, fiber, and cholesterol.Also, previous results classically contain voracious hard-coded heuristics and algorithms.Intrinsically, the drawback of recent techniques is that their models lack flexibility and minimal results.Different single and ensemble machine learning algorithms and deep learning models which includes RNN, LSTM, GRU, MLP, naive bayes and logistic regression classifiers are used in this study.The proposed model consists of six phases.First phase is data reading, second phase is preprocessing, and third phase is optimal features visualization.Training and testing are fourth and fifth phases respectively.Last phase is evaluation phase.Lastly, review of the most recent related works shows that even though a good number of investigations are targeted at emerging tools of computation for food/diet consumption recommendation, nearly all of such systems failed to handle both the preferences and nutritional information of users, directly.In the future, we shall concentrate more on automating this system and adopting it with other eHealth Functionalities [39].Internet of Things nodes, Robotic navigation and Wireless sensor networks will serve as future tools for distant patients on a large scale recommendation [40]- [45], [51] and [52].

III. SYSTEM MATERIALS AND METHODS
The section describes the methodology used in this research.Let us remember that the aim of this study is to recommend diet to different patient using deep and machine learning classifiers for health base medical dataset which will automatically detect which food should be given to which patient base on the disease and other features like age, gender, weight, calories, protein, fat, sodium, fiber, and cholesterol.For this purpose, we have used different deep learning classifiers like RNN, GRU and LSTM and machine learning classifiers naive bayes and logistic regression.In order to know which feature has more impact in the dataset, random forest classifier was used for this purpose.The proposed model which is illustrated in Figure 1 consists of six phases.First phase is data reading, the preprocessing of collected data is established in the second phase, while the third phase is analysis the optimal features visualization.While training and testing are fourth and fifth phases respectively and finally, evaluation phase which is the last phase.

A. DATASET
The dataset used in this research consists of around 1000 products and 30 patients collected by using the IoT and cloud method.1000 products were tested on different disease patients.The dataset has 21 features and 16933 records in it.Products features are listed in Table 1 and patient's features are listed in Table 2.

B. DATA PROCESSING 1) DATA NORMALIZATION
After selection of dataset, data cleaning operations are performed on datasets to remove noise from dataset and normalize the features.The purpose of normalization is to scale the dataset in to one range.The reason for doing this is that dataset has different scale values some are single digit values, some features has two digest values and some features has three-digit values so we bring all the values in to single scale to make the performance of machine learning models better, and for this purpose we performed min-max normalization.
Min-max scaling normalizes values in the range of [0, 1] in this research.Equation ( 1) states the min-max normalization.
where y = (F1, F2, . . .Fn) are the number of features while F i is the feature which we want to normalize and Z i represents the normalized features.By doing this now all features have same weights and all features are in one scope.

2) DATA ENCODING
During the cause of this research, inconsistent and duplicate values are removed from dataset before performing data encoding.After then, the nominal features are converted to numeric values.The purpose of doing this is because backend operations inside machine learning models are done on numeric values before implementing them using machine learning model.In this research, non-numeric data was converted to numeric data before data encoding was performed.ML algorithms backend calculations were also performed on numeric values not nominal values before passing data to the proposed model.Random Forest is a mix of decision trees.In order to get prediction right random forest combine all the decision trees and gives more accurate results.Random forest not only used for classification and regression but also applied to best features from the dataset.We can perform classification and regression by using random forest; this is the best thing about random forest.In case of classifying random forest, the majority vote was used to predict the target but for regression analysis, random forest takes mean value of all the decision trees and then predict as threshold is set for each node.Splitting is then performed base on that threshold [46].
Threshold is set by calculating entropy and gain-index.Equations for entropy and gain-index are given below.
where x 1 , x 2 , . . .x s represents the probabilities of the class labels.

C. DEEP LEARNING CLASSIFIERS 1) MULTILAYER PERCEPTRON (MLP)
There are different types of neural networks that are constantly being developed.However, all ANNs may be characterized by their processing unit (PE) transfer functions.Their learning methods and by the connection equations.PE, is a fundamental component of ANN and it receives many weighted signals from other processing units [46].Figure 3 shows the Biological Neuron structure [47] wile Figure 4 shows the working flow of neural network.Agatonovic-Kustrin and Beresford [48].The architecture of forward ANN is on 1st layer it have input units, in the middle it have hidden layers and last layer consist of output units Figure 5 [49].The job of input unit is to provide data from external source.Then this data is moved to hidden layers where it is multiplied with weights and then it pass to output layer to generate final signals [50].The classification ability of ANN totally base on hidden layers, hidden layers are further connected by the synapses with neighbor's layers.If we have m input data points (x 1 , x 2 , . . .x m ), then we name it as m number of features inside the data.In ANN architecture every feature is multiplied with weight (w 1 , w 2 , . . .w m ) and then add them as shown in (4) below.
m represents total number of features in the dataset given as input X to input layer, w represents weights every feature multiplied with its weight.It is also known as dot product.
Bias function is added inside the dot product function and it will give following (5).
In (5), z represents activation function f (z) in this way we will get output for 1st neuron and for 1st hidden layer.We will repeat this whole process until last weight and for last input as shown in Figure 6.

2) RECURRENT NEURAL NETWORK (RNN)
RNN represents one of the classes of artificial neural networks (ANN) where node-to-node connections produce a graph directed along a temporal order which give way for the exhibition of dynamic behavior.It is also a kind of cutting-edge ANN that contains directed memory cycles.

3) LONG SHORT TERM MEMORY (LSTM)
LThe long short term memory (LSTM) is an architecture or model which performs a memory extension for the RNN.In this study 3 layers LSTM with batch size 32 and sigmoid function is used for activation.For optimization adam function is used.Function loss is calculated with binary cross entropy.

4) GATED RECURRENT UNITS (GRU)
The concept of the Gated Recurrent Units (GRU) is more recent that the LSTM.Generally, it performs more efficiently and unlike the LSTM, it trains models faster.The model is can be easily manipulated and modifications are easily done on the model.However, in a case longer memory is required, LSTM outperforms the GRU.Eventually, performance comparisons is basically dependent on the type of dataset in use.Although the LSTM and GRU also share some similarities, there are some vital variances that should be mentioned and recalled: • The GRU is consisting of two gates, while the LSTM consists of three gates.
• GRUs are void of internal memory that are contrarily to the visible hidden state, and the output gate which is incorporated in LSTMs is not present in the GRUs.
• When computing GRU output, second nonlinearity is not applied unlike the LSTMs.

D. MACHINE LEARNING CLASSIFIERS 1) LOGISTIC REGRESSION
Logistic Regression is also well known classification algorithm used in machine learning.Generally a dichotomous result is obtained with logistic regression.The algorithm's aim is to look for a correlation between the likelihood of specific outcome and characteristics.A logit function or the log odds function is used in logistic regression.In (6), we describe logistic regression as follows: In above equation logit function is log P(X ) 1−P(X ) and odd function is The odds reflect the probability ratio of inclusion of the feature to the possibility of failure or absence of feature.Output usually is one in this algorithm after mapping inputs to log odds in a linear combination.Now, if we find the opposite of the previously mentioned function; This ( 7) is known as a sigmoid function and it creates curve like S shaped.The probability value is generated within the scope of 0 < P < 1.Therefore, we picked the parameters in the logarithm in a way to maximize the possibilities of observing sample values.

2) NAIVE BAYES
Naive Bayes is a compilation of algorithms that share a mutual rule in which all pairs of features are independent.Two premises are taken into consideration in the algorithm; 1) every function is separate and 2) we need to translate the texts into numeric values in the case of attributes in text format.We know, in Bayes' Theorem which is stated in (8); where, A and B events, P(A) = prior probability (event's probability before evidence), P A B = B s posterior probability (event's probability after evidence).Now, we can implement Bayes' theorem by (9); P y X = P X y P(y) where, X = dependent feature vector and y = class variable.X is of size n such that X = (X 1 , X 2 , X 3 . . ., X n ) To split evidence into independent segments for events A and B; P(A, B) = P(A)P(B) Now results becomes P y X 1,....n = P X 1 y P X 2 y . . . . . .P X n y P (X 1 ) P (X 2 ) . . . . . .P (X n ) It can be expressed as (11); P y X 1,....n = P(y) n i=1 P X i y P(X 1 )P(X 2 ) . . . . . ...P(X n ) (11) Denominator is constant for input, so in (12); To produce a classifier model, we have to determine input probabilities for of y and take the output having highest probability.Hence, in (13); y = argmaxP(y) n i=1 P X i y (13) In the end, we are only left with calculating P X i / y and P(y).(15) The purpose of recall is to evaluate True Positive (TP) entities in relation to (FN) False Negative entities that are not at all categorized.Mathematical form of recall is mentioned in (16); Sometimes performance assessment may not be good with accuracy and recall, For instance, if one mining algorithm has low recall but high precision that another algorithm is needed.Then there is the question of which algorithm is better.This problem is solved by using F1-measure that gives an Average recall and precision.F1 measure can be calculated as follows

IV. RESULTS
Experiments are performed on Core-I3 system using colab with 8GB Ram of computer and 13GB from google colab laboratory is used.increases in start and goes to 93% and then it came back to 92.8% along validation score.Figure 10 represents the training and validation score for multilayer perceptron (MLP).MLP training scores increases in start and eventually it goes down and came to 92.83%.
From Figure 11 and Table 4 we can see that deep learning classifiers outclass machine learning classifiers in terms of accuracy.LSTM achieved 97.74% testing accuracy.GRU testing accuracy is also closer to LSTM accuracy which is  In Figure 12 we can see that naive bayes testing and validation score are around 93.96%.For logistic regression testing score increases in start from 92% and goes to 93.80%.The interesting thing for logistic regression in 13 is that cross validation curve remained same throughout this study.Figure 14 represents the testing and validation score for multilayer perceptron (MLP).MLP testing score increases from 92% and goes to 93.82%.from 93.7% and after 50 epoch it goes to 95%.Similarly for testing curve it starts from 94% and goes to 97.5% and then it comeback to 96%.
Figure 16 represents training and testing loss for GRU.Blue curve represents training loss and green curve represents testing loss.Blue curve which represents training loss it starts from 0.28 and reduces to 0.125.Similarly testing loss starts from 0.22 and comedown to 0.075.
Figure 17 represents training and testing scores for LSTM while Figure 18 represents training and testing loss for LSTM respectively.From 15 we can see that blue curve which is training curve starts from 93% and goes up to 97%,   similarly green curve which represents testing score for LSTM starts from 94% and goes to 97%.From Figure 16 we can see that training loss starts from 0.3 and decreases after      Table 5 represents that LSTM model out class other models in terms of precision, recall and F1 Measure.For allowed class LSTM classifier has 98% precision, 99% recall and F1 measure scores respectively.For not allowed class it has 89% precision 73% recall and 80% F1 measure respectively.Other models mention in Table 5 performs well for allowed class but did not perform well for not allowed class but LSTM outclass all other models mention in this research and produced good results for allowed and not allowed classes.Finally, we have used Figure 21 to show the classification report for Machine learning and deep learning models used.

V. CONCLUSION AND FUTURE WORK
Recent studies have shown that robust diets recommended to patients by Dietician or an Artificial Intelligent automated medical diet based cloud system can increase longevity, protect against further disease, and improve the overall quality of life.However, medical personnel are yet to fully understand patient-dietician's rationale of recommender system.Therefore, this paper proposes a deep learning based solution for health base medical dataset that automatically detects which food should be given to which patient base on the disease and other features like age, gender, weight, calories, protein, fat, sodium, fiber, cholesterol.This research framework uses deep learning and machine learning different algorithms such as naive byes, logistic regression Multilayer Perceptron (MLP), Recurrent Neural Network (RNN), Long Short Term Memory (LSTM) and Gated Recurrent Units (GRU).Finally, looking at Tables 5 and Figure 19 we can conclude that LSTM and GRU performs very well in terms of precision, recall and F1 measures for allowed and not allowed classes.For allowed class LSTM classifier has 98% precision, 99% recall and F1 measure scores respectively.For not allowed class it has 89% precision 73% recall and 80% F1 measure respectively.Other models mention in Table 5 performs well for allowed class but did not perform well for not allowed class but LSTM outclass all other models mention in this research in terms of accuracy, precision, recall and F1 Measure and produced good results for allowed and not allowed classes.

FIGURE 1 .
FIGURE 1. Work flow of proposed technique.

FIGURE 2 .
FIGURE 2. Feature significance of using Random Forest Classifier.

Forward
propagation is most widely used ANN architecture trained with backpropagation error developed by

FIGURE 7 .
FIGURE 7. Training accuracies of machine learning models.

FIGURE 8 .
FIGURE 8. Training and cross validation scores for Naive Bayes.

FIGURE 9 .
FIGURE 9. Training and cross validation scores for logistic regression.

FIGURE 10 .
FIGURE 10.Training and cross validation scores for MLP.

Figure 15
represents training and testing scores for GRU.Blue curve represents training curve and green curve represents testing curve.Blue curve which is training curve starts

FIGURE 12 .
FIGURE 12. Testing and cross validation scores for Naive Bayes.

FIGURE 13 .
FIGURE 13.Testing and cross validation scores for logistic regression.

FIGURE 14 .
FIGURE 14. Testing and cross validation scores for MLP.

FIGURE 15 .
FIGURE 15.Training and testing scores for GRU.

FIGURE 16 .
FIGURE 16.Training and testing loss for GRU.

FIGURE 17 .
FIGURE 17. Training and testing scores for LSTM.

FIGURE 18 .
FIGURE 18. Training and testing loss for LSTM.

FIGURE 19 .
FIGURE 19.Training and testing scores for RNN.
50 epoch and it come down to 0.1.Testing curve also starts from 0.2 and comedown to 0.05.

Figure 19
represents training and testing scores for RNN.Blue curve represents training curve and green curve represents testing curve.Blue curve which is training curve starts from 93% and after 50 epoch it goes to 95%.Similarly for testing curve it starts from 94% and goes to 96%.

FIGURE 20 .
FIGURE 20.Training and testing loss for RNN.

FIGURE 21 .
FIGURE 21.Classification report for machine learning and deep learning models.

TABLE 1 .
Number of features in product.

TABLE 2 .
Features of patients.

TABLE 3 .
Training accuracies of models.
, 9 and 10 red line represents the training curve and green curve is cross validation curve.In Figure8we can see that naive bayes training and validation score is same around 92.91%.For logistic regression training score

TABLE 4 .
Testing accuracies of models.