DeepFog: Fog Computing-Based Deep Neural Architecture for Prediction of Stress Types, Diabetes and Hypertension Attacks

: The use of wearable and Internet-of-Things (IoT) for smart and affordable healthcare is trending. In traditional setups, the cloud backend receives the healthcare data and performs monitoring and prediction for diseases, diagnosis, and wellness prediction. Fog computing (FC) is a distributed computing paradigm that leverages low-power embedded processors in an intermediary node between the client layer and cloud layer. The diagnosis for wellness and ﬁtness monitoring could be transferred to the fog layer from the cloud layer. Such a paradigm leads to a reduction in latency at an increased throughput. This paper processes a fog-based deep learning model, DeepFog that collects the data from individuals and predicts the wellness stats using a deep neural network model that can handle heterogeneous and multidimensional data. The three important abnormalities in wellness namely, (i) diabetes; (ii) hypertension attacks and (iii) stress type classiﬁcation were chosen for experimental studies. We performed a detailed analysis of proposed models’ accuracy on standard datasets. The results validated the efﬁcacy of the proposed system and architecture for accurate monitoring of these critical wellness and ﬁtness criteria. We used standard datasets and open source software tools for our experiments.


Introduction
The world is growing industrially and the mortality rate has increased.However, at the same time, the number of lifestyle diseases has also increased.These diseases include type-2 diabetes, cardiac attack, hypertension attack and obesity.The major influencing factors behind these diseases are the type of diet, level of stress, lack of physical activities, and environmental conditions.In certain situations, the side effect of these diseases may lead to fatal conditions such as paralysis attack, cardiac arrest, irregular heartbeat, shortness of breath, chest pain, which require quick attention.The prevalence of diabetes is predicted to increase twice from 171 million in 2000 to 366 million in 2030 only in India [1][2][3][4].The number of people with diabetes has risen from 108 million in 1980 to 422 million in 2014 [5].According to a World Health Organization (WHO) report, diabetes mellitus is the foremost reason behind early blindness, kidney failure, heart attacks, stroke and lower limb amputation [6].In 2014, in America, around 410,000 people died due to hypertension [7].Therefore, it is a requirement to have a quick monitoring and early diagnosis system, which will have low latency, minimum response time and high accuracy.The Government is spending a huge amount of funding on Information Technology infrastructure-based health solutions and support services.Due to high computing facilities, health data collection, processing and analysis could be done faster and the extracted information could be transmitted to individuals as and when required.With these types of solutions, there exist some underlying issues related to data transmission latency, handling and processing huge amounts of data, the accuracy of the working solution.Many health care monitoring systems exist, which use cloud-based systems that store and analyze the bulk amount of data collected from different sources.It has some substantial benefits like scalability, the ability to store a large amount of data, low maintenance, deployment and service cost [8].Bulk amounts of data transmission over the network may cause a delay in transmission, which in turn affects the overall performance of the system.Particularly, in applications like health monitoring, where real-time data transfer is an essential requirement, the system fails to perform correctly by avoiding network latency and a communication delay occurred through the generation of large amounts of data from IoT devices.Therefore, there is a requirement to reduce communication and network latency caused due to huge data transmission over cloud servers.Now, as a solution, researchers and industry personnel are going for a new computing paradigm known as Fog computing (FC).Fog computing was first named by Salvatore Stolfo [9] and was defined as an extended computing version of the cloud.It includes prominent features like facilitating networking, computing, infrastructure and storage support as the backbone for end-user computing.Along with this, it maintains latency constraints.According to CISCO, it is mentioned that "Fog computing is a distributed paradigm that provides cloud-like services to the edge of network" [10].
In all fog-based applications [2,3,[11][12][13][14][15][16][17][18] an intermediary fog layer is built between the physical layer, where edge devices like the sensors deployed in smart health care devices [3,12,19], smart phones, and wearable devices like smart watches, bands from where the row data are collected and the top layers where cloud servers are present.The generalized architecture of fog computing is comprised of three levels [20,21] is depicted in Figure 1.
(1) Physical Level: It may be formed of physical devices like network switches, routers, smart phones, setup boxes, smart refrigerators, and vehicles.These devices are domain specific, depending on the application field.These might be wearable sensors, smart watches or a smart phone in the case of personalized health care monitoring systems.Otherwise, the devices may be smart refrigerators, an intelligent air conditioner in a smart home application.These may be resource constrained or resource intensive based on the application types.The interconnected devices, which are geospatially closer to each other form a virtual cluster (VC).When a new fog instance is admitted to this level, it may join any existing cluster according to the geographical proximity.Similarly, a fog instance may be disconnected from any cluster.The duties of these devices are to sense all of the happening events and transmissions of the same to its immediate upper layer.Herein, the FC paradigm where not every data packet from the physical device is submitted to the cloud, rather some amount of the required real time and latency specific analysis is carried out in this layer, which is sent to the fog layer for further processing.(2) Fog Level: The middle level consists of the fog computing elements called fog nodes, the supporting hardware and software elements including all of the core elements of the network responsible for providing all of the networking support.It is a collection of edge devices such as routers, gateways, switches and access points.These devices are capable of handling all sorts of incoming data generated from the lower level and process them as such.Data may accumulate temporarily and the essential data may be sent out to the above layer for persistence storage.(3) Cloud Level: The topmost level is the cloud layer, which is constituted of a cloud server and data centers.These are meant for bulk data processing and storage of computationally intensive data and applications.
In a traditional cloud computing (CC) architecture, the cloud server is always overloaded with user queries and applications, whereas in an FC architecture, access to the cloud server becomes more controlled and well utilized and has a better performance.The fog layer residing between the physical and cloud layers has some added advantages as it performs some extra tasks such as local storage, processing and some sort of mining in the edge devices.Therefore, it acts as a smart and intelligent gateway [22,23].In most of the literature, researchers have applied an FC layer between the cloud and core network layers to overcome bandwidth latency, delays in network traffic thus, reducing the response time [24,25].For all of these reasons, a fog layer can be used in health care applications to handle massive real time data generated from low level devices, which can continuously monitor the data and process the data to predict the stress types, emotional attacks and diagnose diseases like diabetes.Therefore, it is possible to design a system by which the affecting parameters are continuously monitored and guarded.The different stress levels can be predicted and if any risk is there, an early diagnosis and notification could be provided to the patients, close relatives and doctors as well in the case of an emergency.This system could be used by doctors and hospitals to facilitate services to patients who are located remotely.The end users of this service could be elderly persons or individuals who are physically disabled, live alone, need continuous monitoring or reside far away from healthcare service providers to manage their health conditions in a better way even in remote places.Some of the measured parameters, which affect hypertension are systolic blood pressure (SBP), diastolic blood pressure (DBP), total cholesterol (TC), blood glucose (BG) levels, heart rate (HR), and the level of stress and anxiety.These parameters are difficult to monitor regularly without the help of a hospital or clinic visits.The main contributions of this paper are:

•
To propose DeepFog i.e., a fog based healthcare tele-monitoring system, which could provide services such as remote diagnosis of hypertension levels, as well as a prediction of hypertension attack based on features taken from user's health related data and the symptoms seen.

•
To predict the stress level of a person, that helps the doctor to measure the risk of a hypertension attack related to the stress density.

•
To build a deep neural network-based classifier to handle large amounts of user data collected from various sources, which can predict the risk of a hypertension attack.

•
To build a deep neural network classifier, that can classify normal people and diabetic people in a fog environment by which doctors can be provided with quick information regarding the presence of diabetes mellitus in a patient to handle the patient properly.
more controlled and well utilized and has a better performance.The fog layer residing between the physical and cloud layers has some added advantages as it performs some extra tasks such as local storage, processing and some sort of mining in the edge devices.Therefore, it acts as a smart and intelligent gateway [22,23].In most of the literature, researchers have applied an FC layer between the cloud and core network layers to overcome bandwidth latency, delays in network traffic thus, reducing the response time [24,25].For all of these reasons, a fog layer can be used in health care applications to handle massive real time data generated from low level devices, which can continuously monitor the data and process the data to predict the stress types, emotional attacks and diagnose diseases like diabetes.Therefore, it is possible to design a system by which the affecting parameters are continuously monitored and guarded.The different stress levels can be predicted and if any risk is there, an early diagnosis and notification could be provided to the patients, close relatives and doctors as well in the case of an emergency.This system could be used by doctors and hospitals to facilitate services to patients who are located remotely.The end users of this service could be elderly persons or individuals who are physically disabled, live alone, need continuous monitoring or reside far away from healthcare service providers to manage their health conditions in a better way even in remote places.Some of the measured parameters, which affect hypertension are systolic blood pressure (SBP), diastolic blood pressure (DBP), total cholesterol (TC), blood glucose (BG) levels, heart rate (HR), and the level of stress and anxiety.These parameters are difficult to monitor regularly without the help of a hospital or clinic visits.The main contributions of this paper are: • To propose DeepFog i.e., a fog based healthcare tele-monitoring system,which could provide services such as remote diagnosis of hypertension levels, as well as a prediction of hypertension attack based on features taken from user's health related data and the symptoms seen.

•
To predict the stress level of a person, that helps the doctor to measure the risk of a hypertension attack related to the stress density.

•
To build a deep neural network-based classifier to handle large amounts of user data collected from various sources, which can predict the risk of a hypertension attack.

•
To build a deep neural network classifier, that can classify normal people and diabetic people in a fog environment by which doctors can be provided with quick information regarding the presence of diabetes mellitus in a patient to handle the patient properly.For the attainment of the stated objectives, an intelligent deep learning-based fog model is proposed, which can perform real-time monitoring and synthesis of user's health parameters to detect whether a person is diabetic.If the user is passing through any stress, then it can identify the type of the resulting stress.This result can help the doctors to handle the patient in a proper way.For this, a deep neural network is used to classify the stress types.The data used to predict the stress types are (1) electro dermal activity (EDA); (2) heart rate (HR); (3) arterial oxygen saturation (SpO2) and ( 4) temperature [26,27]  For the attainment of the stated objectives, an intelligent deep learning-based fog model is proposed, which can perform real-time monitoring and synthesis of user's health parameters to detect whether a person is diabetic.If the user is passing through any stress, then it can identify the type of the resulting stress.This result can help the doctors to handle the patient in a proper way.For this, a deep neural network is used to classify the stress types.The data used to predict the stress types are (1) electro dermal activity (EDA); (2) heart rate (HR); (3) arterial oxygen saturation (SpO2) and ( 4) temperature [26,27].The health parameters chosen to predict the risk of hypertension are (1) systolic blood pressure (SBP); (2) diastolic blood pressure (DBP); (3) total cholesterol (TC); (4) high-density lipoprotein (HDL); (5) low-density lipoprotein (LDL); (6) plasma glucose concentration (PGC) and ( 7) HR [28].To detect diabetes mellitus, the data considered are (1) PGC; (2) DBP; (3) 2-h serum insulin (mu U/mL); (4) body mass index (BMI); (5) the diabetes pedigree function; (6) age in years [29][30][31].These data are collected from the users and stored in the fog nodes for synthesis and analysis.The extracted information from the analyzed result is sent to cloud servers and in emergency situations, alerts are generated and sent to users, doctors, relatives, and caretakers of the concerned to make a decision regarding later actions.The details of the information are saved persistently in cloud storage for record keeping, which can be shared with Government institutes, domain experts, and doctors to further analyze the data.
This paper is organized as follows.Section 2 contains the related work about the use of fog computing in the healthcare domain to do an analysis of data, the existing tele-monitoring system used in healthcare.Section 3 presents a detailed description of the proposed system architecture.Section 4 provides experimental details, the carried out case studies along with the results, experimental setup, and performance evaluation.Conclusion and future work are depicted in Section 5.

Related Works
The related work has been categorized into three sections.Section 1 discusses the work, which has been done in the domain of FC in healthcare.The second section includes the ongoing research in deep neural networks meant for the classification of problems.The third section emphasizes the advancement in FC-based tele healthcare monitoring systems.Cisco defined fog computing as a distributed paradigm that provides cloud-like services to the edge of the network.They have been applied in various areas like the analysis of geospatial data [32][33][34], designing augmented reality-based gaming applications [35], smart city applications like vehicular network management [36,37] for smart parking, and sensor data analysis [38][39][40][41][42][43].
A resurgence of interest has been seen in last few years towards artificial neural networks, specifically deep learning has been used extensively after its spectacular success in the area of image classification, regression problems in time series data, and natural language processing [44][45][46].This has been used in stock market analysis and prediction [47][48][49], breast cancer classification [50], classification of electrocardiogram signals [51], image classification [52], object recognition [53], medical image analysis [54], and time-series data analysis [55].Deep learning, otherwise known as feature learning, has been well suited for deriving basic features from the input data and the obtained extracted features can be used to train a model in a better way.The objective of choosing a deep neural network has two intentions.(1) To create a robust model that can extract features from the raw heterogeneous input data.(2) To create a model that can handle high dimensional data.The achievement of these goals has been attained by the given case studies.
The works which are only focusing on health care domain are discussed in this paragraph.Gia [23] has extracted some features from ECG data based on a wireless body area network (WBAN) and tried to detect the heart rate from the ECG signals.They have used FC as a gateway for mining the data, storing them in a distributed manner for providing a notification service at the edge of the network.The raw signals were captured, pre-processed and taken through a wavelet transformation.Their target was to get a better network bandwidth utilization and provide low-latency real-time notifications.Dubey proposed a fog-based architecture for designing a tele-healthcare monitoring system to monitor patients of Parkinson disease.They used time series data containing ECG signals or speech data.The raw data were collected from sensors deployed in the patient's body.Some filters were used on the speech data to extract the loudness and frequency.Additionally, to increase the bandwidth utilization for better network latency, the processed data were compressed by using the GNU zip program.They have emphasized optimizing battery power consumption [24].Monteiro [25] also employed a fog-based solution for obtaining disorder in clinical speech data of Parkinson disease.The raw data were collected from a wearable watch.They tried to process the speech data to extract features such as loudness, short time energy, the zero-crossing rate of speech data.Unlike the previous author, they have not used any specific algorithm, rather they used customized python coding for data extraction.Rahmani [22] proposed a smart e-health monitoring system, which issues an early alert for a patient before any emergency arises.After capturing the noisy data, some filters were used to remove the noisy patterns; the data were compressed using both lossy and lossless compression methods to deal with communication latency.Each of these data analyses were done, which can make decisions about notifications.They have also used a public key encryption scheme to protect the locally stored data in the edge devices.Ahmad [56] exploited FC for designing a customer-centric healthcare application, which can act as a personal care taker giving notifications according to a customer's request.The health data acquisition was done by a smart phone with integrated sensors.The data were collected from different sources and they used an intermediate fog layer between the end user and the cloud to make the data more secure [57].

DeepFog Architecture
The proposed framework, i.e., DeepFog is comprised of three layers namely the user layer, the smart gateway fog layer and a cloud layer.The user layer is an integration of all smart data capturing devices to collect health-related feature data to diagnose diabetes and hypertension attacks, bio-signals to predict the stress types.The collected data are then transmitted to the middle fog layer to do real time processing, diagnosis and prediction.With no delay, the processed information, analyzed health related results, and diagnosis reports are sent to the cloud layer.Thereafter, these data are shared with domain experts, doctors, health-care related persons, and relatives who can take precautionary measures and immediate action in emergency situations.
The main responsibility of this layer is to accumulate all of the heath related parameters required to classify the stress types, to detect whether a user is diabetic and to predict the risk of hypertension attack.arises.After capturing the noisy data, some filters were used to remove the noisy patterns; the data were compressed using both lossy and lossless compression methods to deal with communication latency.Each of these data analyses were done, which can make decisions about notifications.They have also used a public key encryption scheme to protect the locally stored data in the edge devices.Ahmad [56] exploited FC for designing a customer-centric healthcare application, which can act as a personal care taker giving notifications according to a customer's request.The health data acquisition was done by a smart phone with integrated sensors.The data were collected from different sources and they used an intermediate fog layer between the end user and the cloud to make the data more secure [57].

DeepFog Architecture
The proposed framework, i.e., DeepFog is comprised of three layers namely the user layer, the smart gateway fog layer and a cloud layer.The user layer is an integration of all smart data capturing devices to collect health-related feature data to diagnose diabetes and hypertension attacks, bio-signals to predict the stress types.The collected data are then transmitted to the middle fog layer to do real time processing, diagnosis and prediction.With no delay, the processed information, analyzed health related results, and diagnosis reports are sent to the cloud layer.Thereafter, these data are shared with domain experts, doctors, health-care related persons, and relatives who can take precautionary measures and immediate action in emergency situations.
The main responsibility of this layer is to accumulate all of the heath related parameters required to classify the stress types, to detect whether a user is diabetic and to predict the risk of hypertension attack.The health-related attributes are (1) SBP;   To validate the model, three case studies were undertaken.The first case study was carried out to find out the behavioral details of the patient.This provided information of whether a patient is in a relaxed state or is stressed.If she is stressed, then the type of stress she is going through.The second case study focused on detecting whether she is suffering from type-2 diabetes.The reason behind this is that the treatment of a normal person is different from that of a diabetic person.The third case study was taken to do a risk analysis of a hypertension attack.To validate the model, three case studies were undertaken.The first case study was carried out to find out the behavioral details of the patient.This provided information of whether a patient is in a relaxed state or is stressed.If she is stressed, then the type of stress she is going through.The second case study focused on detecting whether she is suffering from type-2 diabetes.The reason behind this is that the treatment of a normal person is different from that of a diabetic person.The third case study was taken to do a risk analysis of a hypertension attack.

Case Study 1-Categorization of Stress Types
While monitoring a patient remotely, especially if it is a case of hypertension, it is very much essential for anyone concerned to judge the stress type of the person.'Stress' is a major parameter and plays a crucial role in knowing a patient's condition, as well as for making a decision about his medication.However, if the stress type is also known before, then it will be more helpful for the experts to make a decision.For example, if the stress type is physical, after resting for some time, it will be normalized.However, for the other two types of stress, there must be some medication plans to normalize the stress level.Therefore, a classification of the stress type is needed.For categorization of stress types, the dataset used was taken from data available atwww.utdallas.edu.Birjandtalab [58] used the data for the visualization of neurological status.This data contains the bio-signals of 20 students, where readings were recorded of EDA, 3-dimensional accelerometer, temperature, HR, SpO2.The data were recorded while going through four neurological states.The states were(1) physically stressed (PS); (2) cognitively stressed (CS); (3) emotionally stressed (ES); (4) relaxed state.In this work, we have considered all four states.Pre-processing was carried out on the data to segregate the equal state data to merge them together.Then, all data samples of 20 subjects were merged to have a total sample space.The data were leveled.CS was leveled as '0', ES was leveled as '0.5' and PS was leveled as '1'.After assigning the levels to the corresponding data instances, the data sample was divided into two sets.Eighty percent of the total sample was taken as

Case Study 1-Categorization of Stress Types
While monitoring a patient remotely, especially if it is a case of hypertension, it is very much essential for anyone concerned to judge the stress type of the person.'Stress' is a major parameter and plays a crucial role in knowing a patient's condition, as well as for making a decision about his medication.However, if the stress type is also known before, then it will be more helpful for the experts to make a decision.For example, if the stress type is physical, after resting for some time, it will be normalized.However, for the other two types of stress, there must be some medication plans to normalize the stress level.Therefore, a classification of the stress type is needed.For categorization of stress types, the dataset used was taken from data available at www.utdallas.edu.Birjandtalab [58] used the data for the visualization of neurological status.This data contains the bio-signals of 20 students, where readings were recorded of EDA, 3-dimensional accelerometer, temperature, HR, SpO2.The data were recorded while going through four neurological states.The states were(1) physically stressed (PS); (2) cognitively stressed (CS); (3) emotionally stressed (ES); (4) relaxed state.In this work, we have considered all four states.Pre-processing was carried out on the data to segregate the equal state data to merge them together.Then, all data samples of 20 subjects were merged to have a total sample space.The data were leveled.CS was leveled as '0', ES was leveled as '0.5' and PS was leveled as '1'.After assigning the levels to the corresponding data instances, the data sample was divided into two sets.Eighty percent of the total sample was taken as training data and the remaining 20% wastaken as test data.The data went through a normalization process according to the expression given in Equation ( 1), to bring them in the range of 0 to 1.
where IP norm represents the normalized value of the input parameter IP, IP max and IP min are the maximum and minimum value present for the original IP.Figures 4-7 represent the distribution of the parameters taken to detect the stress types.These graphs below show a clear variation of the features according to the stress types except for SpO2.For the SpO2 case, the area enclosed for three stress types is overlapping, so this feature can be discarded while doing the prediction.However, apart from this, all others are capable of obtaining the proper class of stress.training data and the remaining 20% wastaken as test data.The data went through a normalization process according to the expression given in Equation ( 1), to bring them in the range of 0 to 1.
where IP norm represents the normalized value of the input parameter IP, IP max and IP min are the maximum and minimum value present for the original IP.Figures 4-7 represent the distribution of the parameters taken to detect the stress types.These graphs below show a clear variation of the features according to the stress types except for SpO2.For the SpO2 case, the area enclosed for three stress types is overlapping, so this feature can be discarded while doing the prediction.However,apart from this, all others are capable of obtaining the proper class of stress.training data and the remaining 20% wastaken as test data.The data went through a normalization process according to the expression given in Equation ( 1), to bring them in the range of 0 to 1.
where IP norm represents the normalized value of the input parameter IP, IP max and IP min are the maximum and minimum value present for the original IP.Figures 4-7 represent the distribution of the parameters taken to detect the stress types.These graphs below show a clear variation of the features according to the stress types except for SpO2.For the SpO2 case, the area enclosed for three stress types is overlapping, so this feature can be discarded while doing the prediction.However,apart from this, all others are capable of obtaining the proper class of stress.

Case Study 2-Prediction of Diabetes
The treatment of a diabetic person is different than that of a non-diabetic person.Due to the side effects generated, any drug must be handled for a diabetic person.There exist some recent traditional methods that are used to do an early prediction of diabetes.Liu and Gao have employed a method based on differential entropy on gene expression data for the early detection of diabetes [59].Wu has exploited an improvised K-Means algorithm and logistic regression to design a prediction model for type-2 diabetes mellitus [60].For a health expert, knowledge about being or not being diabetic will be a great help.Therefore, there is a requirement for detecting it before any decision.For predicting diabetes, the data used are (1) the plasma glucose concentration;(2) diastolic blood pressure;(3) 2-h serum insulin (mu U/mL);(4) body mass index;(5) the diabetes pedigree function; (6) age in years [29][30][31].These data can be collected using health sensors embedded in smart phones.For experimental purposes, a standard dataset from University of California learning repository (C.L. Blake, C.J. Merz) was taken and used.All of these data samples were normalized by following Equation (1).show the distribution of four major features (2 h serum insulin, DBF, PGC and DBP) to predict diabetes, which shows a clear isolation of features according to their classes.

Case Study 2-Prediction of Diabetes
The treatment of a diabetic person is different than that of a non-diabetic person.Due to the side effects generated, any drug must be handled for a diabetic person.There exist some recent traditional methods that are used to do an early prediction of diabetes.Liu and Gao have employed a method based on differential entropy on gene expression data for the early detection of diabetes [59].Wu has exploited an improvised K-Means algorithm and logistic regression to design a prediction model for type-2 diabetes mellitus [60].For a health expert, knowledge about being or not being diabetic will be a great help.Therefore, there is a requirement for detecting it before any decision.For predicting diabetes, the data used are (1) the plasma glucose concentration;(2) diastolic blood pressure;(3) 2-h serum insulin (mu U/mL);(4) body mass index;(5) the diabetes pedigree function; (6) age in years [29][30][31].These data can be collected using health sensors embedded in smart phones.For experimental purposes, a standard dataset from University of California learning repository (C.L. Blake, C.J. Merz) was taken and used.All of these data samples were normalized by following Equation (1).show the distribution of four major features (2 h serum insulin, DBF, PGC and DBP) to predict diabetes, which shows a clear isolation of features according to their classes.

Case Study 2-Prediction of Diabetes
The treatment of a diabetic person is different than that of a non-diabetic person.Due to the side effects generated, any drug must be handled for a diabetic person.There exist some recent traditional methods that are used to do an early prediction of diabetes.Liu and Gao have employed a method based on differential entropy on gene expression data for the early detection of diabetes [59].Wu has exploited an improvised K-Means algorithm and logistic regression to design a prediction model for type-2 diabetes mellitus [60].For a health expert, knowledge about being or not being diabetic will be a great help.Therefore, there is a requirement for detecting it before any decision.For predicting diabetes, the data used are (1) the plasma glucose concentration;(2) diastolic blood pressure;(3) 2-h serum insulin (mu U/mL);(4) body mass index;(5) the diabetes pedigree function; (6) age in years [29][30][31].These data can be collected using health sensors embedded in smart phones.For experimental purposes, a standard dataset from University of California learning repository (C.L. Blake, C.J. Merz) was taken and used.All of these data samples were normalized by following Equation (1).

Case Study 3-Risk Assessment of Hypertension Attack
Hypertension is a type of infirmity, which may lead to some other critical and life-threatening diseases like cardiac failure, thickening of the heart muscle, and renal failure.It is diagnosed as a diastolic or systolic blood pressure of more than 90 mm Hg or 120 Hg respectively for at least two measuring instances.However, a sudden rise or fall of these values could cause the risk of a hypertension stroke by which one person may move to paralysis or comma like dangerous situations.Risk assessments of this disease are dependent on a multitude of factors including a few transient ecological circumstances, which may artificially elevate blood pressure readings [61].The identifying factors, which influence these situations are grouped into five types of data, which are depicted in Table 1.The effect of these identifying factors is also shown in the table and clinical health information such as SBP, DBP, HDL, LDL have a larger influence on hypertension than location and time [62].The blood pressure measurements are classified into five stages according to the reading values of DBP and SBP parameters such as normal, the pre-hypertension stage, hypertension stage-1, hypertension stage-2 and the hypertensive crisis stage, which are depicted in Table 2 [63].Patients belonging to hypertension stage-1, stage-2 and hypertensive crisis were the major portion of samples, which have a high probability of being the victim.

Case Study 3-Risk Assessment of Hypertension Attack
Hypertension is a type of infirmity, which may lead to some other critical and life-threatening diseases like cardiac failure, thickening of the heart muscle, and renal failure.It is diagnosed as a diastolic or systolic blood pressure of more than 90 mm Hg or 120 Hg respectively for at least two measuring instances.However, a sudden rise or fall of these values could cause the risk of a hypertension stroke by which one person may move to paralysis or comma like dangerous situations.Risk assessments of this disease are dependent on a multitude of factors including a few transient ecological circumstances, which may artificially elevate blood pressure readings [61].The identifying factors, which influence these situations are grouped into five types of data, which are depicted in Table 1.The effect of these identifying factors is also shown in the table and clinical health information such as SBP, DBP, HDL, LDL have a larger influence on hypertension than location and time [62].
Table 1.Types of data used, their attributes, and their effect.

Case Study 3-Risk Assessment of Hypertension Attack
Hypertension is a type of infirmity, which may lead to some other critical and life-threatening diseases like cardiac failure, thickening of the heart muscle, and renal failure.It is diagnosed as a diastolic or systolic blood pressure of more than 90 mm Hg or 120 Hg respectively for at least two measuring instances.However, a sudden rise or fall of these values could cause the risk of a hypertension stroke by which one person may move to paralysis or comma like dangerous situations.Risk assessments of this disease are dependent on a multitude of factors including a few transient ecological circumstances, which may artificially elevate blood pressure readings [61].The identifying factors, which influence these situations are grouped into five types of data, which are depicted in Table 1.The effect of these identifying factors is also shown in the table and clinical health information such as SBP, DBP, HDL, LDL have a larger influence on hypertension than location and time [62].The blood pressure measurements are classified into five stages according to the reading values of DBP and SBP parameters such as normal, the pre-hypertension stage, hypertension stage-1, hypertension stage-2 and the hypertensive crisis stage, which are depicted in Table 2 [63].Patients belonging to hypertension stage-1, stage-2 and hypertensive crisis were the major portion of samples, which have a high probability of being the victim.The blood pressure measurements are classified into five stages according to the reading values of DBP and SBP parameters such as normal, the pre-hypertension stage, hypertension stage-1, hypertension stage-2 and the hypertensive crisis stage, which are depicted in Table 2 [63].Patients belonging to hypertension stage-1, stage-2 and hypertensive crisis were the major portion of samples, which have a high probability of being the victim.

Stage of Hypertension SDP Reading DBP Reading
In this work, for assessing the risk of hypertension and to reduce the communication delay after training the deep neural network, during a real time prediction of hypertension attack, user requests were divided into two groups: (i) the high probable victim group and (ii) the low probable victim group.A priority was set for user requests that fall into the high probable group and these users were served first.This is because the high probable victim group is more susceptible to a hypertension stroke compared to the low probable victim group.Algorithm 1 was used to isolate the high probable victim group from the low probable victim group so that a higher priority would be given to serve the high probable victim group.For classifying the high probable and low probable victims, a rule has been set according to the data provided in Table 2.The intention behind filtering the high probable instances was to reduce communication latency.

Output: High probable victim group
Here, Detect_Diabetes() is the method to check diabetes mellitus stated in case study 2. It returns true or false.The Predict_Stress() method returns the mental state of a person.The values returned are the type of stress (cognitive, physical or emotional) or it may be a relaxed state stated in case study-1.

Experimental Setup, Results and Evaluation:
This section of the paper gives a representation of the experimental setup, implementation details, results and performance evaluation.This has been further divided into four subsections named as (1) setting up the fog-based system architecture;(2) data collection and pre-processing;(3) constructing a deep neural network model;(4) performance validation of the computing model.

Setting Up the Fog-Based System Architecture
In line with the suggested model discussed in Figure 3, the top most layer is a cloud layer configured with a set of open source software.For setting up the cloud storage, 'Owncloud' was used that was connected to the Apache web-server.To configure it, PHP and MySQL were needed in the background.The cloud server was deployed on Cent OS7.The database used in MySQL was MariaDB.This led to the persistent storage of the processed results forwarded from the fog network.MariaDB is a fork of MySQL, which is commonly used by a Linux distribution-like CentOS.The fog layer was comprised of three virtual machines (VM)that are considered as individual fog nodes.To maintain heterogeneity among the fog nodes, three VMs were made to run on different operating systems-two on Windows and one on Linux.For this, a Mininet emulator has been used.One virtual machine was responsible for storing data.The code for Algorithm 1 is written here, which is meant for separating the high and low probable victim groups.One was installed with the Deep learning tool Dl4j (deep learning for Java), responsible for the data analysis.This is further discussed in detail in Section 4.4.We have not captured data from sensors or any IoT devices in this work.The user interface was not designed fully through which the data could be captured from IoT devices or smart phones.For experimental purposes, we have used relevant and similar data, which are available.The used architecture is represented in Figure 12.

Data Collection
The details of the data used for carrying out the case studies are presented in Table 3.The data were collected from the sources provided in Table 1.For stress classification and diabetes prediction, the readily available datasets were used.However, for predicting the risk of a hypertension attack, a data set was prepared by extracted the parameters taken from the three datasets.systems-two on Windows and one on Linux.For this, a Mininet emulator has been used.One virtual machine was responsible for storing data.The code for Algorithm 1 is written here, which is meant for separating the high and low probable victim groups.One was installed with the Deep learning tool Dl4j (deep learning for Java), responsible for the data analysis.This is further discussed in detail in Section 4.4.We have not captured data from sensors or any IoT devices in this work.The user interface was not designed fully through which the data could be captured from IoT devices or smart phones.For experimental purposes, we have used relevant and similar data, which are available.The used architecture is represented in Figure 12.

Data Collection
The details of the data used for carrying out the case studies are presented in Table 3.The data were collected from the sources provided in Table 1.For stress classification and diabetes prediction, the readily available datasets were used.However, for predicting the risk of a hypertension attack, a data set was prepared by extracted the parameters taken from the three datasets.For preparing the training data set for a hypertension attack, the data was created after combining some selected features taken from the three datasets, which were the diabetes dataset, the stress dataset and the kidney disease dataset.The kidney disease dataset contained25 attributes.Among them, one attribute was hypertension, which contained a yes or no value indicating the presence of hypertension.Among the 24 attributes, some of the selected feature attributes were chosen.For selecting the feature, a simple technique was used.Here, the data were clustered into two groups according to the presence of a yes or no value for the hypertension field using a K-means clustering algorithm.Then, the data clusters were analyzed to find the distribution of the contributing attributes in the formed cluster.If the data of a certain attribute was found to belong to the wrong cluster, then that attribute was not taken into the training of the hypertension risk assessment.The K-means algorithm was used for leveling data instances.For preparing the training data set for a hypertension attack, the data was created after combining some selected features taken from the three datasets, which were the diabetes dataset, the stress dataset and the kidney disease dataset.The kidney disease dataset contained25 attributes.Among them, one attribute was hypertension, which contained a yes or no value indicating the presence of hypertension.Among the 24 attributes, some of the selected feature attributes were chosen.For selecting the feature, a simple technique was used.Here, the data were clustered into two groups according to the presence of a yes or no value for the hypertension field using a K-means clustering algorithm.Then, the data clusters were analyzed to find the distribution of the contributing attributes in the formed cluster.If the data of a certain attribute was found to belong to the wrong cluster, then that attribute was not taken into the training of the hypertension risk assessment.The K-means algorithm was used for leveling data instances.

Data Visualization andExploratory Data Analysis
For doing the primary pre-analysis and visualization of the data, 'Orange 3.4.4'was employed [64].'Orange' is an open source, 'Python' based tool, which is a data visualization, machine learning and data mining tool kit.It was applied for carrying out explorative data analytics and interactive data visualization jobs.It is a Python library that is used for performing data analytics tasks.Figures 13  and 14 show the distribution of DBP and SBP data values belonging to two of the clusters.As they do not have any interfering values, these features have more impact on the formed clusters.Similarly, the data values plotted for RBC and potassium contents are presented in Figures 15 and 16 respectively.These sets of values are interfering with each other.Therefore, these are the weak features for segregating the positive and negative hypertension data.

Data Visualization andExploratory Data Analysis
For doing the primary pre-analysis and visualization of the data, 'Orange 3.4.4'was employed [64].'Orange' is an open source, 'Python' based tool, which is a data visualization, machine learning and data mining tool kit.It was applied for carrying out explorative data analytics and interactive data visualization jobs.It is a Python library that is used for performing data analytics tasks.Figures 13 and 14 show the distribution of DBP and SBP data values belonging to two of the clusters.As they do not have any interfering values, these features have more impact on the formed clusters.Similarly, the data values plotted for RBC and potassium contents are presented in Figures 15 and 16 respectively.These sets of values are interfering with each other.Therefore, these are the weak features for segregating the positive and negative hypertension data.

Data Visualization andExploratory Data Analysis
For doing the primary pre-analysis and visualization of the data, 'Orange 3.4.4'was employed [64].'Orange' is an open source, 'Python' based tool, which is a data visualization, machine learning and data mining tool kit.It was applied for carrying out explorative data analytics and interactive data visualization jobs.It is a Python library that is used for performing data analytics tasks.Figures 13 and 14 show the distribution of DBP and SBP data values belonging to two of the clusters.As they do not have any interfering values, these features have more impact on the formed clusters.Similarly, the data values plotted for RBC and potassium contents are presented in Figures 15 and 16 respectively.These sets of values are interfering with each other.Therefore, these are the weak features for segregating the positive and negative hypertension data.

Deep Neural Network Model
To build the prediction model, deep learning has been adapted.In our context, it can automatically explore the representations from the raw inputs.The proposed model can be described as follows.Given a training set composed of n features represented by T = {(Ii,Oi)},i = 1,2,..., n, where Ii∈R T , where I is a feature vector of dimension T, Oi∈ [1,C] is the corresponding class label of Ii.The neural network specifies a nonlinear relationship between the two components hi and hi+1 through a network function, which has a form where α is an activation function and the matrix W and δ are the model components or parameters that need to be adjusted.hi+1 and hi can be represented as layers.Here, α is either aReLU or SoftMax function.In the case of a single layer neural network, there is only one layer.If they are augmented with multiple layers and adapted advanced learning strategies, they form a deep neural network (DNN).For a prediction model indulged with a prediction function,O = f(I) can be built by stacking multiple network functions like h1, h2, …., O given in Equations ( 3)-( 5).

Deep Neural Network Model
To build the prediction model, deep learning has been adapted.In our context, it can automatically explore the representations from the raw inputs.The proposed model can be described as follows.Given a training set composed of n features represented by T = {(Ii,Oi)},i = 1,2,..., n, where Ii∈R T , where I is a feature vector of dimension T, Oi∈ [1,C] is the corresponding class label of Ii.The neural network specifies a nonlinear relationship between the two components hi and hi+1 through a network function, which has a form where α is an activation function and the matrix W and δ are the model components or parameters that need to be adjusted.hi+1 and hi can be represented as layers.Here, α is either aReLU or SoftMax function.In the case of a single layer neural network, there is only one layer.If they are augmented with multiple layers and adapted advanced learning strategies, they form a deep neural network (DNN).For a prediction model indulged with a prediction function,O = f(I) can be built by stacking multiple network functions like h1, h2, …., O given in Equations ( 3)-( 5).

Deep Neural Network Model
To build the prediction model, deep learning has been adapted.In our context, it can automatically explore the representations from the raw inputs.The proposed model can be described as follows.Given a training set composed of n features represented by T = {(I i , O i )}, i = 1, 2, ..., n, where I i ∈ R T , where I is a feature vector of dimension T, O i ∈ [1,C] is the corresponding class label of I i .The neural network specifies a nonlinear relationship between the two components h i and h i + 1 through a network function, which has a form where α is an activation function and the matrix W and δ are the model components or parameters that need to be adjusted.h i + 1 and h i can be represented as layers.Here, α is either aReLU or SoftMax function.In the case of a single layer neural network, there is only one layer.If they are augmented with multiple layers and adapted advanced learning strategies, they form a deep neural network (DNN).For a prediction model indulged with a prediction function, O = f (I) can be built by stacking multiple network functions like h 1 , h 2 , . . .., O given in Equations ( 3)-( 5).
In the above equation, 'l' is the number of layers.
DL4j is used for building a deep neural network for validating the proposed model.It uses a simple deep neural network having more than one hidden layer.DL4j is a distributed deep learning framework used for creating, training and deploying a deep neural network model.It is based on an object oriented language 'Java', thus it is platform independent.It is well suited for a big data environment as it can handle massive amounts of data in a very reasonable time frame.It could be integrated with other parallel and distributed programming environments like 'Hadoop' or'Spark' and it also supports GPU computing [65,66].It has several built in classes and methods to create artificial deep models and to handle different types of data such as CSVRecordReader, ImageRecordReader, JacksonRecordReader, VideoRecordReader classes for handling input data like csv files, image data, JSON data and video data respectively.In this work, CSVRecordReader has been used to deal with csv data.A 'transform' class was used to normalize the data.'MultiLayerConfiguration' was the most important class, which was used to configure the network.The numbers of the inputs were 7, 5 and 8 and the outputs were 2,4 and 2 respectively for diabetes, stress and hypertension prediction.The configuration details are provided in Table 4.The number of instances was increased by randomly combining the present instances and made 5000 instances in the case of diabetes and hypertension samples to effectively train the deep neural network.The stress dataset was large enough, so it is used as it is.From the 5000 instances, 3500 were used as the training set and rest was used for testing purposes.The 'pretrain ()' value was set to be '0', as this network used a supervised learning scheme.For unsupervised autoencoders, this 'pretrain ()' parameter must be set to 1.The dense layers have three inputs each.The learning rate parameters were fixed for the stated values depicted Table 4 using a hit and trial method.These parameters were fixed after executing several iterations and finalized against minimum error values.The input layer activation function was chosen as Tanh() for diabetes and hypertension whereas it was ReLU() for the stress data samples.The activation function in the output layer was SoftMax, through this the number of output nodes was set to the number of classes.The 'iteration' parameter was set as 1000.The 'iteration' parameter in DL4j was one update of the neural network model parameter.It was not the same as the epoch of conventional NN.An epoch means the number of iterations to complete a pass for all instances of the dataset.The experiment was conducted to set the 'iteration' parameter as 1000, then incremented by 1000 each time.However, there was no significant difference between the average accuracy value over 10 numbers of runs for 5000 and 6000 iterations.

Performance Evaluation
Table 5 represents the performance matrix of the proposed model for the diabetes data set, where as Tables 6 and 7 are presenting the performance matrix of stress classification and hypertension attack.In DL4j, the performance of a deep neural network was interpreted by a library class named as 'evaluation', contained a predefined method called get FeatureMatrix().This method can be called after training the neural network on the test dataset.It produces a confusion matrix formed out of four evaluating parameters, which were accuracy, precision, recall and F1 score.Accuracy is the simple ratio of correctly classified instances to the total number of instances.Precision is the ratio of correctly predicted positive instances to the total predicted positive instances.Recall is the quantity calculated from the correctly predicted positive samples to total instances in the original class.The F1 score is a weighted average value of the precision and recall values.The expressions for precision and recall are given in Equations ( 2) and (3).Recall = TP TP + FN (7) Precision = TP TP + FP (8) where TP is true positive, FP is false positive, and FN is false negative values of the given sample.It can be observed from the result that, for the 5000 iteration value, the proposed model has achieved almost 92% accuracy for the stress dataset, 88% accuracy in hypertension cases, whereas for diabetes it is getting an accuracy of 84%.The resultant precision value, recall, and F1 score are also competent enough to validate the proposed model.The results were compared with some similar works done by various researchers in the last few years.The current work of stress classification was weighted against some existing models.
The parameters on which the works were evaluated are the types of tools used for the work, the objective of the work, the prediction accuracy percentage, the input data and the use of a fog environment.It has been presented in Table 8.The job of type-2 diabetes mellitus detection was compared on the basis of the methods used for the work, the accuracy percentage and the exploitation of cloud or fog in the reported work.This is shown in Table 9.The early detection of a hypertension attack is evaluated with other state of the art research on the basis of the domain application, the purpose of the research, the use of cloud storage (CS), fog environment (FE), and the prediction model (PM), as shown in Table 10.This experiment was carried out on a 64-bit machine, using a windows 7 system, with an Intel quad core processor.The java version used was 1.8.DL4j had a user interface provision for providing the used software information and hardware information, presenting the attributes-like installed operating system, JVM version, JDK version, heap memory available, required memory for JVM, the current consumed memory, are provided in Tables 11 and 12 respectively.It can be noted that the experiment was carried out in a CPU mode, so if the ND4j backend showed a CPU, if it would execute in a parallel environment, it would have been showing the backend as GPU.The hardware information the model generated detailed information of the available heap memory and consumed heap memory.Similarly the allocated memory for JVM and the current consumption of JVM memory.As the used system was a quad core system, the available number of processors for JVM was four. Figure 17 presents the loss function of the deep neural network.This is the function showing the resulting error value between the actual output and the calculated value.It can be seen that the error is gradually falling down and approaches towards zero.Figure 18 shows the ratio of the parameter updates during the execution of the subsequent layers.The network weight changes are shown against the number of iterations.Figure 19 shows the standard deviation of the activations, gradients and updates against time.It can be observed that these are approaching zero.Figure 20 gives the memory utilization report of the Java virtual machine (JVM) and the heap memory consumption was 64% at a particular instance.It means that out of the allocated 1 GB of off-heap memory, 64% was utilized for the current work.DL4j provided this interface, which lets the user know that the memory consumption of JVM and the off-heap memory.The off-heap memory is the portion of the main memory, which is not managed by JVM, thereby it reduces the complexity of garbage collection of JVM.The default allocation of the off-heap memory is one fourth of the available free main memory of the system.The memory limits of the off-heap memory can be controlled but for this experiment, the default values were taken.As a system with 4 GB RAM was used for the experiment, one fourth of this memory i.e., 1 GB was allocated to the off-heap memory.JVM memory.As the used system was a quad core system, the available number of processors for JVM was four. Figure 17 presents the loss function of the deep neural network.This is the function showing the resulting error value between the actual output and the calculated value.It can be seen that the error is gradually falling down and approaches towards zero.Figure 18 shows the ratio of the parameter updates during the execution of the subsequent layers.The network weight changes are shown against the number of iterations.Figure 19 shows the standard deviation of the activations, gradients and updates against time.It can be observed that these are approaching zero.Figure 20 gives the memory utilization report of the Java virtual machine (JVM) and the heap memory consumption was 64% at a particular instance.It means that out of the allocated 1 GB of off-heap memory, 64% was utilized for the current work.DL4j provided this interface, which lets the user know that the memory consumption of JVM and the off-heap memory.The off-heap memory is the portion of the main memory, which is not managed by JVM, thereby it reduces the complexity of garbage collection of JVM.The default allocation of the off-heap memory is one fourth of the available free main memory of the system.The memory limits of the off-heap memory can be controlled but for this experiment, the default values were taken.As a system with 4 GB RAM was used for the experiment, one fourth of this memory i.e., 1 GB was allocated to the off-heap memory.Percentage of the main memory utilization for JVM and heap memory.In DL4j, off-heap memory is the portion of the main memory, which is not used by JVM.Therefore,the work of the garbage collector by JVM is limited.The off-heap memory management was carried out using the underlying native operating system.

Conclusions
The whole world has scientifically and technologically come to a significant level.At the same pace, the lifestyle of people is changing.The amount of physical work and exercise has gone down and, at the same time, the stress level has gone up.This is leading to an alarming situation as it stimulates the growth rate of lifestyle disease like diabetes and hypertension.It now becomes a    Percentage of the main memory utilization for JVM and heap memory.In DL4j, off-heap memory is the portion of the main memory, which is not used by JVM.Therefore,the work of the garbage collector by JVM is limited.The off-heap memory management was carried out using the underlying native operating system.

Conclusions
The whole world has scientifically and technologically come to a significant level.At the same pace, the lifestyle of people is changing.The amount of physical work and exercise has gone down and, at the same time, the stress level has gone up.This is leading to an alarming situation as it stimulates the growth rate of lifestyle disease like diabetes and hypertension.It now becomes a    Percentage of the main memory utilization for JVM and heap memory.In DL4j, off-heap memory is the portion of the main memory, which is not used by JVM.Therefore,the work of the garbage collector by JVM is limited.The off-heap memory management was carried out using the underlying native operating system.

Conclusions
The whole world has scientifically and technologically come to a significant level.At the same pace, the lifestyle of people is changing.The amount of physical work and exercise has gone down and, at the same time, the stress level has gone up.This is leading to an alarming situation as it stimulates the growth rate of lifestyle disease like diabetes and hypertension.It now becomes a Percentage of the main memory utilization for JVM and heap memory.In DL4j, off-heap memory is the portion of the main memory, which is not used by JVM.Therefore, the work of the garbage collector by JVM is limited.The off-heap memory management was carried out using the underlying native operating system.

Conclusions
The whole world has scientifically and technologically come to a significant level.At the same pace, the lifestyle of people is changing.The amount of physical work and exercise has gone down and, at the same time, the stress level has gone up.This is leading to an alarming situation as it stimulates the growth rate of lifestyle disease like diabetes and hypertension.It now becomes a major concern of all including doctors, caregivers and the elderly population.With the significant developments in computation and advanced communication technology, effective solutions can be designed to solve this problem.This paper tries to propose a feasible fog computing-based deep learning model i.e., DeepFog to detect a person's mental state and does an early detection for type-2 diabetes from some of the captured data.It builds a model to assess the risk of hypertension attacks.The proposed solution further separates the high probable victim group of a hypertension attack, giving a priority to critical cases.The deep neural network was implemented using Python for constructing the hypertension dataset.The Java-based tool DL4j was leveraged to implement the proposed model.The fog environment was setup using a set of open source infrastructure.The results and discussions validate the efficacy of the proposed approach in wellness monitoring.We compared our results with other contemporary state-of-the-art research approaches where we found the proposed approach to be superior or competitive with current state-of-the-art technologies.In future work, we would like to further tune the neural models for various user-based studies.This would further create opportunities for research and development for robust systems development in the wellness monitoring area.

Figure 1 .
Figure 1.General three level architecture of fog computing.

Figure 1 .
Figure 1.General three level architecture of fog computing.
The health-related attributes are (1) SBP; (2) DBP; (3) HDL; (4) LDL; (5) PGC; (6) HR; (7) 2-h serum insulin; (8) BMI; (9) the diabetes pedigree function; (10) age in years; (11) EDA; (12) SpO2.Other data, which have an impact on a related attack include the surrounding, current physical activity, and Global Positioning System (GPS) data.All of these data are collected by the smart phones, wearable smart devices connected to the user's body.The sensors embedded in these devices are able to collect the data.
Figure 2 represents the overall framework of the proposed model, where as Figure 3 presents the sequence diagram which gives an overview of the work flow of individual functions of the entire framework.
(2) DBP; (3) HDL; (4) LDL; (5) PGC; (6) HR; (7) 2-h serum insulin; (8) BMI; (9) the diabetes pedigree function; (10) age in years; (11) EDA; (12) SpO2.Other data, which have an impact on a related attack include the surrounding, current physical activity, and Global Positioning System (GPS) data.All of these data are collected by the smart phones, wearable smart devices connected to the user's body.The sensors embedded in these devices are able to collect the data.Figure 2 represents the overall framework of the proposed model, where as Figure 3 presents the sequence diagram which gives an overview of the work flow of individual functions of the entire framework.

Figure 2 .
Figure 2.The proposed DeepFog framework has a middle layer that works as a smart gateway, residing between the user and the cloud layer.The user layer is an integration of all smart data

Figure 2 .
Figure 2. The proposed DeepFog framework has a middle layer that works as a smart gateway, residing between the user and the cloud layer.The user layer is an integration of all smart data capturing

Figure 3 .
Figure 3.The proposed System model of the DeepFog.

Figure 3 .
Figure 3.The proposed System model of the DeepFog.

Figure 4 .
Figure 4.The distribution of according to three stress types.

Figure 5 .
Figure 5.The distribution of the temperature data(Temp) according to the three stress types.

Figure 4 .
Figure 4.The distribution of according to three stress types.

Figure 4 .
Figure 4.The distribution of according to three stress types.

Figure 5 .
Figure 5.The distribution of the temperature data(Temp) according to the three stress types.

Figure 5 .
Figure 5.The distribution of the temperature data(Temp) according to the three stress types.

Figure 6 .
Figure 6.The distribution of the heartrate data according to the three stress types.

Figure 7 .
Figure 7.The distribution of the arterial oxygen saturation data (SpO2) according to the three stress types.

Figure 6 .
Figure 6.The distribution of the heartrate data according to the three stress types.

Figure 6 .
Figure 6.The distribution of the heartrate data according to the three stress types.

Figure 7 .
Figure 7.The distribution of the arterial oxygen saturation data (SpO2) according to the three stress types.

Figure 7 .
Figure 7.The distribution of the arterial oxygen saturation data (SpO2) according to the three stress types.
show the distribution of four major features (2 h serum insulin, DBF, PGC and DBP) to predict diabetes, which shows a clear isolation of features according to their classes.

Figure 8 .
Figure 8.The distribution of 2-h Serum insulin for the two classes (0-diabetes and 1-non-diabetes).

Figure 9 .
Figure 9.The distribution of the diabetes pedigree function(DBF) for the two classes.

Figure 10 .
Figure 10.The distribution of the plasma glucose concentration (PGC) for the two classes (0-diabetes and 1-non-diabetes).

Figure 9 .
Figure 9.The distribution of the diabetes pedigree function(DBF) for the two classes.

Figure 10 .
Figure 10.The distribution of the plasma glucose concentration (PGC) for the two classes (0-diabetes and 1-non-diabetes).

Figure 9 .Figure 8 .
Figure 9.The distribution of the diabetes pedigree function(DBF) for the two classes.

Figure 9 .
Figure 9.The distribution of the diabetes pedigree function(DBF) for the two classes.

Figure 10 .
Figure 10.The distribution of the plasma glucose concentration (PGC) for the two classes (0-diabetes and 1-non-diabetes).

Figure 10 .
Figure 10.The distribution of the plasma glucose concentration (PGC) for the two classes (0-diabetes and 1-non-diabetes).

Figure 12 .
Figure 12.The fog-based system architecture used to deploy the Deep-fog system.

Figure 12 .
Figure 12.The fog-based system architecture used to deploy the Deep-fog system.

Figure 13 .
Figure 13.Data distribution of diastolic blood pressure (DBP in a box-plot, showing the range data;the mean value after clustering the data using the K-means clustering technique.Here, 0.0 represents the cluster for the non-hypertension class and 1.0 represents the hypertension class.It can be seen that the two sets of data are non-overlapping in nature.

Figure 14 .
Figure 14.Data distribution of Systolic Blood Pressure SBP in a box-plot showing the range of the data, its mean value after clustering the data using the K-means clustering technique.Her,e 0.0 represents the cluster for the non-hypertension class and 1.0 represents the hypertension class.

Figure 13 .
Figure 13.Data distribution of diastolic blood pressure (DBP in a box-plot, showing the range data; the mean value after clustering the data using the K-means clustering technique.Here, 0.0 represents the cluster for the non-hypertension class and 1.0 represents the hypertension class.It can be seen that the two sets of data are non-overlapping in nature.

Figure 13 .
Figure 13.Data distribution of diastolic blood pressure (DBP in a box-plot, showing the range data;the mean value after clustering the data using the K-means clustering technique.Here, 0.0 represents the cluster for the non-hypertension class and 1.0 represents the hypertension class.It can be seen that the two sets of data are non-overlapping in nature.

Figure 14 .
Figure 14.Data distribution of Systolic Blood Pressure SBP in a box-plot showing the range of the data, its mean value after clustering the data using the K-means clustering technique.Her,e 0.0 represents the cluster for the non-hypertension class and 1.0 represents the hypertension class.

Figure 14 .
Figure 14.Data distribution of Systolic Blood Pressure SBP in a box-plot showing the range of the data, its mean value after clustering the data using the K-means clustering technique.Here, 0.0 represents the cluster for the non-hypertension class and 1.0 represents the hypertension class.

Figure 15 .
Figure 15.Data distribution of potassium box-plot, showing the range of the data, its mean value after clustering the data using the K-means clustering technique.Here, 0.0 reresents the cluster for the non-hypertension class and 1.0 represents the hypertension class.It can be seen that the two sets of data are overlapping in nature.

Figure 16 .
Figure 16.Data distribution of the Red Blood Cell RBC count in a box-plot showing the range of the data, its mean value after clustering the data using the K-means clustering technique.Here, 0.0 reresents the cluster for the non-hypertension class and 1.0 represents the hypertension class.It can be seen that the two sets of data are overlapping in nature.

Figure 15 .
Figure 15.Data distribution of potassium box-plot, showing the range of the data, its mean value after clustering the data using the K-means clustering technique.Here, 0.0 reresents the cluster for the non-hypertension class and 1.0 represents the hypertension class.It can be seen that the two sets of data are overlapping in nature.

Figure 15 .
Figure 15.Data distribution of potassium box-plot, showing the range of the data, its mean value after clustering the data using the K-means clustering technique.Here, 0.0 reresents the cluster for the non-hypertension class and 1.0 represents the hypertension class.It can be seen that the two sets of data are overlapping in nature.

Figure 16 .
Figure 16.Data distribution of the Red Blood Cell RBC count in a box-plot showing the range of the data, its mean value after clustering the data using the K-means clustering technique.Here, 0.0 reresents the cluster for the non-hypertension class and 1.0 represents the hypertension class.It can be seen that the two sets of data are overlapping in nature.

Figure 16 .
Figure 16.Data distribution of the Red Blood Cell RBC count in a box-plot showing the range of the data, its mean value after clustering the data using the K-means clustering technique.Here, 0.0 reresents the cluster for the non-hypertension class and 1.0 represents the hypertension class.It can be seen that the two sets of data are overlapping in nature.

Figure 17 .
Figure 17.A snapshot of the score versus iteration chart.This shows the value of the loss function of a currently running set of instances.The loss function depicts the mean square error between the actual and target output.

Figure 17 .
Figure 17.A snapshot of the score versus iteration chart.This shows the value of the loss function of a currently running set of instances.The loss function depicts the mean square error between the actual and target output.

Figure 18 .
Figure 18.The ratio of parameters to updates (by layer) for all network weights vs. Iteration.It shows the update of the parameters against the number of iterations taken during training.

Figure 19 .
Figure 19.Standard deviations of the activations, gradients and updates versus time.Updates refer to the update of the training parameters such as momentum and learning rate parameter.

Figure 20 .
Figure20.Percentage of the main memory utilization for JVM and heap memory.In DL4j, off-heap memory is the portion of the main memory, which is not used by JVM.Therefore,the work of the garbage collector by JVM is limited.The off-heap memory management was carried out using the underlying native operating system.

Figure 18 .
Figure 18.The ratio of parameters to updates (by layer) for all network weights vs. Iteration.It shows the update of the parameters against the number of iterations taken during training.

Figure 18 .
Figure 18.The ratio of parameters to updates (by layer) for all network weights vs. Iteration.It shows the update of the parameters against the number of iterations taken during training.

Figure 19 .
Figure 19.Standard deviations of the activations, gradients and updates versus time.Updates refer to the update of the training parameters such as momentum and learning rate parameter.

Figure 20 .
Figure20.Percentage of the main memory utilization for JVM and heap memory.In DL4j, off-heap memory is the portion of the main memory, which is not used by JVM.Therefore,the work of the garbage collector by JVM is limited.The off-heap memory management was carried out using the underlying native operating system.

Figure 19 .
Figure 19.Standard deviations of the activations, gradients and updates versus time.Updates refer to the update of the training parameters such as momentum and learning rate parameter.

Figure 18 .
Figure 18.The ratio of parameters to updates (by layer) for all network weights vs. Iteration.It shows the update of the parameters against the number of iterations taken during training.

Figure 19 .
Figure 19.Standard deviations of the activations, gradients and updates versus time.Updates refer to the update of the training parameters such as momentum and learning rate parameter.

Figure 20 .
Figure20.Percentage of the main memory utilization for JVM and heap memory.In DL4j, off-heap memory is the portion of the main memory, which is not used by JVM.Therefore,the work of the garbage collector by JVM is limited.The off-heap memory management was carried out using the underlying native operating system.

Figure 20 .
Figure20.Percentage of the main memory utilization for JVM and heap memory.In DL4j, off-heap memory is the portion of the main memory, which is not used by JVM.Therefore, the work of the garbage collector by JVM is limited.The off-heap memory management was carried out using the underlying native operating system.
Computation 2018, 6, x FOR PEER REVIEW 6 of 25 capturing devices to collect health-related feature data to diagnose diabetes and hypertension attacks, bio-signals to predict the stress types.Administrative users have access to maintain avariety of datasets stored in the cloud layer.

Table 1 .
Types of data used, their attributes, and their effect. S.

Table 2 .
Categorization of stages of hypertension.

Table 1 .
Types of data used, their attributes, and their effect. S.

Table 2 .
Categorization of stages of hypertension.

Table 2 .
Categorization of stages of hypertension.

Separation of high probable victim group and low probable victim group Input
: S = {S1, S2, ......, Sn} where S is the set of total testing sample data 1.Obtain the DBP and SDP value of Si; where Si represents the data of 'ith' instance out of Total sample set S 2. If (DBP of Si >= 90 && SDP of Si >= 140)

Table 3 .
Datasets used, their attributes, and the source of data.

Table 3 .
Datasets used, their attributes, and the source of data.

Table 4 .
Configuration of the deep neural network.

Table 5 .
Performance matrix for diabetes mellitus prediction.

Table 6 .
Performance matrix for the stress classification model.

Table 7 .
Performance matrix of the hypertension risk assessment model.

Table 8 .
Comparative analysis of stress classification.

Table 10 .
Comparative analysis of Hypertension risk detection.