A Healthcare System for Internet of Things (IoT) Application: Machine Learning Based Approach

Internet of things (IoT) has become an interesting topic in the field of technological research. It is basically interconnecting of devices with each other over the internet. Beside its general use in terms of autonomous cars and smart homes, but some of the best applications of IoT technology in fields of health care monitoring is worth mentioning. The main purpose of this research work is to provide comport services for patients. It can be used to promote basic nursing care by improving the quality of care and patient safety from patient home environment. Rural area of a country lacks behind the proper patient monitoring system. So, remote monitoring and prescribing by sharing medical information in an authenticated manner is very effective for betterment of medical facilities in rural area. We have proposed a healthcare system which can analyze ECG report using supervise machine learning techniques. Analyzing report can be stored in cloud platform which can be further used to prescribe by the experienced medical practitioner. For performance evaluation, ECG data is analyzed using six supervised machine learning algorithms. Data sets are divided into two groups: 75 percent data for training the model and rest 25 percent data for testing. To avoid any kind of anomalies or repetitions, cross validation and random train-test split was used to obtain the result as accurate as possible.


Introduction
Machine learning allows systems the ability to automatically learn and improve from experience without programming explicitly. This is an application of artifi- Machines and software agents are allowed to automatically determine the ideal behavior within a specific context in order to maximize its performance. ECG provides us with series of sinus rhythms which defines the condition of heart. ECG is useful for detecting certain types of conditions and because of its low cost, it is the most common test for screening heart diseases. An ECG telemonitoring system supports patients from avoiding frequent visits to hospitals and allows monitoring ECG patients. ECG signals of patients can be useful to identify different types of heart problems.
Wireless health care services provide remote monitoring diagnoses to the patient every now and then. At the present time, these services evolved tremendously that it is not only restricted to give services for the cognitive and physical disabilities patients but also can also maintain high-quality services for newborn and young children. Furthermore, ECG pattern recognition is often useful as an early warning system for heart diseases. So, we plan about finding anomalies in Heart Rate of ECG reports and figure out which algorithm gives better and reliable results for some particular heart disease. Often the doctors and medical staffs face problems in interpreting an ECG report. Very little change in any section of the ECG graph can result in different kinds of diseases. During medical emergencies, like in ER or ICU, where time is of the essence, it would be more advantageous to find out what is ailing the patient for immediate treatment.
Moreover, it is very difficult for a doctor to read an ECG report with bare eyes. At times, there is a high chance to miss out any abnormality in the ECG report as the change in the ECG wave shape is hardly noticeable. With the recent development in Machine Learning field, the scope of performing in different sectors and concluding with better accuracy and optimized performance has increased. Medical science has also improved over time. Considering all these factors, we decided to do use Machine learning technique to distinguish between normal and abnormal heart rate by detecting some diseases that occur due to change in any section of the ECG graph. We are introducing a secure IoT-based healthcare monitoring system utilizing Machine learning prediction algorithms for predicting different heart diseases. We have trained our model by supervised machine learning. Journal of Computer and Communications pervised machine learning algorithm. Section 5 describes performance evaluation and finally, Section 6 concludes with mentioning future work.

Literature Review
Nowadays the increasing of technologies health experts is taking great advantage of these electronic gadgets. IoT devices are highly used in medical sector. Especially, for Cardiac patients, high blood pressure patients, hypertension problems, diabetic patients, etc. in rural area because in rural area number of doctors is less than urban area. In rural area, medical equipment is not available except government hospital. So, the number of patients is higher, than government hospital. Also, the equipment is expired in many cases. So, if any emergency call is needed, this hardware device will immediately send the report to the doctors or intern doctors. Medical practitioner will do their rest of works by their checking the reports. Of many chronic illnesses, hypertension has become a common major disease that remains the route cause for cardiac/stroke mortality. But in present time, no remote Heart Rate Variability (HRV) analysis systems for hypertension patient available to help the doctors to track down the progression of the patient's condition or critical events in rural area [1].
IoT is nothing but an advanced concept of Information Communication Technology (ICT). Technologies are broadly expanded in web based or on line system [2]. Now-a-days collecting information in real time is vital. When the critical condition, patients are discharging from the hospital, he or she needs to check up on regular basis. That is why IoT based heath monitoring system is the best option for rural area. We live in an era where computation is being moved from vast centralized servers to PCs and cloud. For a long time researchers have been working on identifying and predicting different diseases using machine learning. Exploration supervised learning, unsupervised learning and reinforcement learning, which is better for machine learning are analysed in [3] [4] [5].
There has been much work in the field of classification and most work has been based on neural networks, Markov chain models and Support Vector Machines (SVMs). In [6] a comparison between three different machine learning algorithms was discussed. It has been done by many to improve past algorithm or create a new one for machine learning.
In [7] a definite review of pre-processing strategies, ECG databases, highlight extraction methods, classifiers and execution measures are displayed. Machine learning in medical science is unmistakable research related to the osmosis of present-day innovations: programming, PC and data advancements [8]. There is even research on defining the ECG wave from other waves or mixed-signal. For example, Independent Component Analysis (ICA) is connected on the blended signs and the isolated signs are recreated utilizing wavelet remaking and correlating the results demonstrate that Lifting Wavelet Transformation and FASTICA algorithm creates the best SNR estimation of 11.39 for maternal and 10.10 for fatal Electro Cardio Gram signals [9]. ECG early warning system comes to light Journal of Computer and Communications for meeting public health, medical informatics referring to health services and information delivered or enhanced through the internet and related technologies [10].
Ultimately, there is much research work involving machine learning and medical science, however, we choose to work with ECG or the functionality of the human heart. During the time most common defect in human body is primarily related to heart. We try to implement an IoT-based machine learning utilized ECG classification system which can be helpful both for rural healthcare.

Research Methodology
According to the WHO, 4.9 million people died from lungs cancer, over weight Afterwards, we did the research on predicting few diseases depending on the availability of the data for a particular disease. The model that we trained to predict the outcome for different diseases and classify between normal and abnormal ECG can also be used to predict outcome for other diseases that we did not work for. In addition, our target was to figure out which algorithm gives the best result in predicting the diseases we worked with. We analysed the results that we predicted by using our model and calculated the accuracy level of different algorithms. A typical ECG tracing of a cardiac cycle, consists of a P wave, QRS Complex, T wave, and a U wave which is normally visible in 50% to 75% of ECGs.
The baseline of the ECG (flat segments) represents the portion of the tracing that follows the T wave or in some cases the U wave and precedes the next P wave. In a normal healthy heart, the baseline is almost equivalent to isoelectric.

Proposed Security Model and Framework
We have implemented four algorithms (Decision Tree, Nearest Neighbor, Naive Bayes, Support Vector Machine (SVM)) separately to analyze ECG data [11] [12].

Decision Tree
It is a supervised learning method used to solve classification problems mostly. It works for both categorical and continuous input and output variables. The model learns simple decision rules inferred from its data features and then predicts the value of a target variable. In other words, the population or sample is divided into two or more homogeneous sets (or sub-populations) based on most significant differentiator in input variables.

Nearest Neighbor
It is a type of instance-based learning that simply stores instances of the training data. In short, it involves a training set of cases and the aim is to predict the label from these predefined numbers of training samples closest in distance to the new point.

Naive Bayes
It is a training and classification algorithm for data that is distributed according to multivariate Bernoulli distributions. It is suitable for linear classification.
There may be multiple features but each one is assumed to be a binary-valued variable. Therefore, this class requires samples to be represented as binaryvalued feature vectors and the decision rule for the algorithm is based on.

Support Vector Machine (SVM)
This is a set of supervised learning method that is used for classification, regres-

Results and Discussion
The test bed implementation is shown in Figure 3. In addition, we have utilized the data set from UC Irvine Machine Learning Repository database to validate the performance of the different machine learning methods. Figure 4 shows the prediction results for different types of machine learning methods.
Therefore, by examining the results given in