{'fraction_non_alphanumeric': 0.03390724484798252, 'fraction_numerical': 0.010172173454394756, 'mean_word_length': 4.9144385026737964, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
An IoT-based framework for early identification and monitoring of COVID-19 cases

Highlights • Early Identification or Prediction of COVID-19 cases.• Real-time Monitoring of COVID-19.• Treatment Response of COVID-19 confirmed cases.• An IoT-based Framework for COVID-19.


Introduction
Since its discovery in late December of 2019, there have been more than 14.5 million confirmed cases of COVID-19 reported in 185 countries, as of July 21, 2020 [1], with approximately a 2 % daily increase. Among these cases there have been more than 95 thousand deaths, which represents an approximate 4.2 % mortality rate. This novel coronavirus was characterized on March 11, 2020 as a pandemic by the World Health Organization [2]. Unfortunately, there is no successful treatment procedure or vaccine yet. It is expected that the development of an effective vaccine will take more than a year, especially since the nature of the virus has not yet been completely characterized [3].
Currently, the only way that the world can deal with this coronavirus is to slow down its spread, (i.e. "flatten the curve") by using measures such as social distancing, hand washing and face masks. However, technology could also help slow its spread, through early identification (or prediction) and monitoring of new cases [4,5]. Such technologies include big data, as well as cloud and fog capabilities [6], the use of data gathered through remote monitoring, such as mHealth, teleHealth, and real-time patient status follow-up [7]. This paper proposes a COVID-19 detection and monitoring system that would collect real-time symptom data from wearable sensor technologies. To quickly identify potential coronaviruses cases from this real-time data, this paper proposes the use of eight machine learning algorithms, namely Support Vector Machine (SVM), Neural Network, Naïve Bayes, K-Nearest Neighbor (K-NN), Decision Table, Decision Stump, OneR, and ZeroR. This detection and monitoring system could be implemented with an IoT infrastructure that would monitor both potential and confirmed cases, as well as the treatment responses of patients who recover from the virus. In addition to real-time monitoring, this system could contribute to the understanding of the nature of the virus by collecting, analyzing and archiving relevant data.
The proposed framework consists of five main components: (1) realtime symptom data collection (using wearable devices), (2) treatment and outcome records from quarantine/isolation centers, (3) a data analysis center that uses machine learning algorithms, (4) healthcare physicians, and (5) a cloud infrastructure. The aim of this framework, is to reduce mortality rates through early detection, following up on recovered cases, and a better understanding of the disease.
This work conducts an experiment to test these eight machine learning algorithms on a real dataset. The results show that five of these eight algorithms achieved accuracies of more than 90 %. Using these five algorithms will provide effective and accurate prediction and identification of potential cases of COVID-19, based on real-time symptom data. This paper is organized as follows. Section 2 reviews the relevant literature. Section 3 details the proposed framework, including the five components. Section 4 focuses on the identification (or prediction) of new cases, using machine learning algorithms. Lastly, Section 5 concludes the work.

Literature review
There is considerable work in the literature regarding the use of the Internet of Things (IoT) to deliver health services. Usak et al. conducted a systematic literature review of the use of IoT in health care systems. That work also included a discussion of the main challenges of using IoT to deliver health services, and a classification of the reviewed work in the literature [8].
Wu et al. proposed a hybrid IoT safety and health monitoring system. The goal was to improve outdoor safety. The system consists of two layers: one is used to collect user data, and the other to aggregate the collected data over the Internet. Wearable devices were used to collect safety indicators from the surrounding environment, and health signs from the user [9].
Hamidi studied authentication of IoT smart health data to ensure privacy and security of health information. The work proposed a biometric-based authentication technology [10].
Rath and Pattanayak proposed a smart healthcare hospital in urban areas using IoT devices, inspired by the literature. Issues such as safety, security and timely treatment of patients in VANET zone were discussed. Evaluation of the proposed system was conducted using simulators such as NS2 and NetSim [11].
Darwish et al. proposed a CloudIoT-Health paradigm, which integrates cloud computing with IoT in the health area, based on the relevant literature. The paper presented the challenges of integration, as well as new trends in CloudIoT-Health. These challenges are classified at three levels: technology, communication and networking, and intelligence [12].
Zhong and Li studied the monitoring of college students during their physical activities. The paper focused on a Physical Activity Recognition and Monitoring (PARM) model, which involves data pre-processing. Several classifiers, such as decision tree, neural networks, and SVM, were tested and discussed [13].
Din and Paul proposed an IoT-based smart health monitoring and management architecture. The architecture is composed of three layers: (1) data generation from battery-operated medical sensors and processing, (2) Hadoop processing, and (3) application layers. Because of the limited capacity of batteries to power the sensors, the work employed an energy-harvesting approach using piezoelectric devices attached to the human body [14].
Otoom et al. developed an IoT-based prototype for real-time blood sugar control. ARIMA and Markov-based statistical models were used to determine the appropriate insulin dose [21]. Alshraideh et al. proposed an IoT-based system for Cardiovascular Disease detection. Several machine learning algorithms were used for CVD detection [22].
Nguyen presented a survey of Artificial intelligence (AI) methods being used in the research of COVID-19. This work classified these methods into several categories, including the use of IoT [15]. Maghdid proposed the use of sensors available on smartphones to collect health data, such as temperature [16].
Rao and Vazquez proposed the use of machine learning algorithms to identify possible COVID-19 cases. The learning is done on collected data from the user through web survey accessed from smartphones [17]. Allam and Jones discussed the need to develop standard protocols to share information between smart cities in pandemics, motivated by the outbreak of COVID-19. For instance, AI methods can be applied to data collected from thermal cameras installed in smart cities, to identify possible COVID-19 cases [18]. Fatima et al. proposed an IoT-based approach to identify coronavirus cases. The approach is based on a fuzzy inference system [19]. Peeri et al. conducted a comparison between MERS, SARS, and COVID-19, using the available literature. They suggested the use of IoT in mapping the spread of the infection [20].
To our knowledge, no one has developed a complete framework for using IoT technology for the identification and monitoring of COVID-19.

IoT background
The Internet of things (IoT) uses communication and sensor technologies, as well as ubiquitous and pervasive computing, to upgrade physical objects into smart objects [31]. This enables the delivery of smart services to users, to improve the quality of their lives [32]. IoT architectures consist mainly of three layers: physical, network, and application [33]. Physical objects are equipped with sensors to collect heterogeneous data. These sensors have a limited computational capacity, and a limited lifetime. The more data that they collect, the more helpful decisions can be made. However, data processing complexity becomes a bottleneck [34]. Connectivity can be used to cope with the limited computational power of these sensors. Several different communication technologies have been employed, including 6LoWPAN, Bluetooth, IEEE 802.15.4, RFID and near-field communication (NFC) [31].
The network layer is not just used to upload collected data, for analysis. It is also used to facilitate communication between heterogeneous IoT objects, at the physical layer. In doing this, the network layer should support scalability, as the number of the objects increases, as well as device discovery, and context awareness. Significantly, it should also provide security and privacy for IoT devices [35]. The data uploaded from the IoT devices can be deeply analyzed, to generate insights and help make decisions. Currently, Machine Learning and Deep Learning (ML/DL) algorithms are used for this purpose, and are replacing more traditional methods because of their ability to deal with big data [36]. Al-Garadi et al. provided a thematic taxonomy of ML/DL used for IoT Security [37].
There are a wide range of applications where IoT can be effectively used, including healthcare, smart cities, smart buildings, agriculture, and power grids. In healthcare, IoT is sometimes called Internet of Medical Things (IoMT) [38]. It has largely displaced traditional ICT-based methods, such as telemedicine or telehealth. IoMT can provide more advanced features than these traditional methods. For example, while traditional methods can connect patients with medical doctors remotely, IoMT also supports machine-human and machine-machine interactions, such as AI-based diagnosis.
One important issue in designing IoMT is the balance between data privacy/security and patient safety [39]. Examples of cyber threats that challenge such designs are eavesdropping on communication channels (to sell the collected data), intervention, disruption, or even modification of the service. However, in cases where the patient's life is at risk, breaking some security measures to access the IoMT might be needed to save the patient's life [40]. ML/DL methods can be used to support this balance.

The proposed IoT framework
This section depicts and discusses our envisioned IoT-based framework, which could be used to monitor and identify (or predict) potential coronaviruses cases, in real time. Equally important, this framework could be used to predict the treatment response of confirmed cases, as well as to better understand the nature of the COVID-19 disease. Fig. 1 shows the framework of our proposed IoT architecture. It consists of five main components: Symptom Data Collection and Uploading, a Quarantine/Isolation Center, a Data Analysis Center, an interface to Health Physicians, all of which are interconnected through a Cloud Infrastructure.

Symptom data collection and uploading
The aim of this component is to collect real-time symptom data through a set of wearable sensors on the user's body. In our earlier study [41], the most relevant COVID-19 symptoms were identified, based on a real COVID-19 patient dataset. These identified symptoms were: Fever, Cough, Fatigue, Sore Throat, and Shortness of Breath.
There are several biosensors available to detect these symptoms. For instance, temperature-based sensors can be used for the detection of Fever [23]. Cough and its classifications for different ages can be detected using audio-based sensors with acoustic and aerodynamic models [24]. Motion-based and heart-rate sensors can be used to detect Fatigue [25]. Sore Throat can be detected using image-based classification [26]. Finally, oxygen-based sensors can be used to detect Shortness of Breath [27].
Other relevant datasuch as travel and contact history during the past 3-4 weeks, can be collected in an ad-hoc manner through mobile applications.

Quarantine/isolation center
This component collects data records from users who have been quarantined or isolated in a health care center. These records include both health (or technical) and non-technical data. For health (or technical) data, each record includes time-series data of the abovementioned symptoms, while for non-technical data, each record includes travel and contact history during the past 3-4 weeks, chronic diseases, age, gender, and any other relevant information, such as family history of illness. Each record would eventually also include the treatment response for each case.

Data analysis center
The Data Center hosts data analysis and machine learning algorithms. These algorithms are used to build a model for COVID-19, and to provide a real-time dashboard of the processed data. The model could then be used to quickly identify or predict potential COVID-19 cases, based on real-time data collected and uploaded from users. The model can also predict the patient's treatment response. Over time, the disease models developed from this data will provide useful information about the nature of the disease.

Health physicians
Physicians will monitor suspected cases whose real-time uploaded symptom data indicates a possible infection by our proposed machine learning based identification/prediction model. The physicians will then be able to respond swiftly to these suspected cases by following up with any further clinical investigation needed to confirm the case. This allows the confirmed cases to be isolated and given appropriate health care.

Cloud infrastructure
The cloud infrastructure is interconnected through the Internet, and (1) allows upload of real-time symptom data from each user, (2) maintains personal health records, (3) communicates prediction results, (4) communicates physician recommendations, and (5) provides for storage of information.  1 The system non-invasively collects real-time user symptom data through wearable devices and sensors. Again, these symptoms are: Fever, Cough, Fatigue, Sore Throat, and Shortness of Breath. Further, the user submits information via a mobile application about living in (or travel to) infected areas, as well as possible contact with COVID-19 infected persons. The Quarantine/Isolation Center also periodically submits data from their isolated and quarantined patients who are housed in the center. The content of that data is similar to the real-time data collected from users. 2 The sensed symptom data are uploaded to the Data Analysis Center using a smartphone, through the Cloud Infrastructure. Digital records from the health care center are also regularly sent to the Data Analysis Center through the Cloud Infrastructure. The Data Analysis Center hosts machine learning algorithms, which use the data received from the health care center to continuously update its models. The models are then used to identify potential cases, based on the real-time symptom data from each user. The data center also analyzes all its data, and presents the results on a real-time dashboard. That dashboard can be informative to physicians about the nature of the virus. 3 If a potential case is identified, it will be sent to the relevant physician to follow up with the patient. The patient will then be called and encouraged to visit the health care center for clinical tests, such as the Polymerase Chain Reaction (PCR) test, which is used to identify positive cases. If it turns out that the case is confirmed, the patient can be isolated, and all contacts will be contacted and quarantined.
A complementary and integral component to this framework is the use of the same mobile application to educate users, by including useful information on how they can avoid illness, and how to avoid being exposed to the virus.

Prediction of potential cases
This section further discusses the predictive models, and the machine learning algorithms that will be employed in the Data Center component of the proposed IoT-based framework.
In particular, an experiment was conducted to investigate the possibility of using machine learning algorithms for quick identification (or prediction) of potential COVID-19 infections. The rest of this section describes that experimental setup, and presents and discusses the results.

Dataset
A dataset of 14251 confirmed COVID-19 cases from the COVID-19 Open Research Dataset (CORD-19) repository [28] was used. The data contains different types of information about each case. Our work focused on symptoms, travel history to suspicious areas, and contact history with potentially infected people. However, some of this information was missing for many of the cases documented within the database. Moreover, the data was not well structured for use by machine learning algorithms.

Data preprocessing
In our previous work [41], the data was preprocessed and structured to be better suited for machine learning. The cases with documented symptoms were collected. This resulted in a list of 80 symptoms. However, many of these symptoms were judged to be synonyms. Thus, the number of symptoms was reduced to 20. This merging of synonymous symptoms was done in an ad-hoc manner by two medical doctors, who are co-authors of this work. For example, "anorexia" and "loss of appetite" were merged together.
Our previous work also determined the relative importance of these 20 symptoms. The following six different statistically-based feature selection algorithms were employed in that work, to rank the 20 symptoms, based on their importance: Spectral Score, Information Score, Pearson Correlation, Intra-Class Distance, Interquartile Range, and our Variance Based Feature Weighting [41]. The first five of these methods had been proposed earlier in the literature [42]. The sixth method was a new one. It not only ranks the symptoms, but also assigns importance weights to each of them. It was found that the most important five symptoms (ordered from most important to least important) are: Fever, Cough, Fatigue, Sore Throat, and Shortness of Breath.
Based on the findings of that earlier work, this work uses those five most important symptoms. In addition, two extra features were added: Live and Contact. The first feature (Live) represents whether or not the person lived, travelled to, or passed by a potentially infected area. The second feature (Contact) represents whether or not the person was known to be in contact with a potentially infected person. This resulted in a preprocessed dataset of 1476 × 7 data records. Among which 854 of those records were from confirmed COVID-19 cases, and 622 records were for non-confirmed cases.

Predictive model
This work used this preprocessed dataset to build a predictive model for our identification (or prediction) system. The function of this model is to estimate the likelihood that a given person is infected by COVID-19.
Several learning algorithms (i.e. classifiers) could have been used for this purpose. Those classifiers can be categorized into multiple categories. WEKA Software [30], (which we used in this work) categorizes the classifiers into six categories: (1) function-based classifiers, such as Support Vector Machines, (2) lazy classifiers, such K-Nearest Neighbors, (3) Bayes based classifiers, such as Naïve Bayes, (4) rule-based classifiers, such as Decision Tables, ZeroR, and OneR, (5) tree-based classifiers, such as Decision Stump, and (6) meta classifiers, such Neural Networks.
This work used WEKA Software to run all of these algorithms on our dataset [30]. The default parameter values were used for each of the eight algorithms. Below is a brief description of the eight algorithms:

Support Vector Machine (SVM)
. SVM is a supervised learning method. Given a set of training examples that are labeled (i.e. each instance in the training set either belongs to the positive or negative class), SVM learns the hyperplane that best separates the instances from each class, and maximizes the margin between the data instances and the hyperplane itself. This learnt hyperplane is then used to assign (or predict) a class label for any new test instance.

Artificial Neural Network (ANN)
. ANN is a supervised learning method. The learning process tries to mimic the learning that takes place inside the human brain. To do so, multiple layers of nodes are connected through edges. The edges connecting between the nodes are represented as numerical weights. The output of each node is computed as weighted sum of its inputs.
Given a set of training examples that are labeled (i.e. each instance either belongs to the positive or negative class), the ANN learns the numerical weights that best classify the instances from each class.
This learnt model is then used to assign (or predict) a class label for any given test instance. The test instance drives the inputs to the nodes of the first layer. Then a threshold is applied to the outputs of the final layer, to determine the label for that test instance.

Naïve Bayes.
Naïve Bayes is a supervised learning method. The learning process follows a probabilistic approach. It uses Bayes theorem to compute the model parameters.
Given a set of training examples that are labeled (i.e. each instance either belongs to the positive or negative class), Naïve Bayes computes multiple model parameters, such as the probability of each class label to occur. These parameters are then used to assign (or predict) a class label for any given test instance. This is done by computing the probabilities of the test instance to be assigned to each of the possible class labels. The maximum value among these probabilities decides the label of that test instance. (K-NN). K-NN is a supervised instancebased learning method. The learning process follows a lazy approach. It does not compute a model.

K-Nearest Neighbors
Given a set of training examples that are labeled (i.e. each instance either belongs to the positive or negative class), K-NN computes distances between a given test instance and all the training instances. These distances are then used to assign (or predict) a class label for the test instance. This is done by aggregating the class labels of the K closest training instances to the test instance. instance either belongs to the positive or negative class), this method computes a model by building a decision tree, with only one internal node. In other words, it makes the prediction for any given test instance using only one feature of that instance. This feature is determined by computing the information gain for all features across all training instances, selecting the one with the maximum information gain value.

One Rule (OneR).
OneR is a supervised learning method. Given a set of training examples that are labeled (i.e. each instance either belongs to the positive or negative class), this method computes a model by generating one rule for each feature in the data set. It then selects the one with the minimum total error.   any new test instance to the majority class. Usually, it is used as a benchmark to determine baseline performance.

Performance evaluation
To evaluate the performance of the eight learning algorithms, four performance measures were used: Accuracy, Root Mean Square Error, Fmeasure, and ROC area. These measures can be computed using a confusion matrix and cross validation methods.

Confusion matrix.
The confusion matrix is used to visualize the performance of a binary (2-class) supervised learning problem by creating a 2-by-2 matrix. Each row in the matrix shows the instances in the predicted (or computed) class, while each column shows the instances in the actual class. The resulting matrix consists of four values (see Table 1 (using the predictive model) as negative, and they are actually negative.

Cross validation.
Cross Validation is a statistical method used to measure the performance of learning and classification methods. This is done by splitting the available labeled data instances into k folds. One of these folds is used for testing, and the rest are used for training. This work used 10-fold cross validation. The data instances are divided into 10 folds. For 10 iterations, one-fold was used for testing and 9 folds for training, such that in every iteration a different fold is used for testing.

Accuracy.
The accuracy of a classifier is computed as the number of correctly classified instances to the total number of instances. It is given by:   Fig. 4 shows the ROC curves that resulted from applying 10-fold cross validation to the eight selected classifiers. Fig. 4 shows the ROC curves that resulted from applying 10-fold cross validation to the eight selected classifiers. Table 2 and Fig. 5 compare the performance of the eight algorithms. It shows the Accuracy, Root Mean Square Error, F-measure and ROC Area of each algorithm, which were calculated using the well-known 10fold cross validation method [29].

Performance measures
The results presented in Table 2 and Fig. 5 suggest that the models built using SVM, Neural Network, Naïve Bayes, K-NN and Decision Table algorithms are effective in predicting confirmed and potential cases of COVID-19.
Taken together, this suggests that our proposed IoT-based framework could use a combination of these five effective models. This could be done by aggregating the results of these five learnt models, based on majority votes.

Conclusions
This paper has proposed an IoT-based framework to reduce the impact of communicable diseases. The proposed framework was used to employ potential COVID-19 case information and health records of confirmed COVID-19 cases to develop a machine-learning-based predictive model for disease, as well as for analyzing the treatment response. The framework also communicates these results to healthcare physicians, who can then respond swiftly to suspected cases identified An experiment was conducted to test eight machine learning algorithms on a real COVID-19 dataset. They are: (1) Support Vector Machine, (2) Neural Network, (3) Naïve Bayes, (4) K-Nearest Neighbor (K-NN), (5) Decision Table, (6) Decision Stump, (7) OneR, and (8) ZeroR. The results showed that all these algorithms, except the Decision Stump, OneR, and ZeroR achieved accuracies of more than 90 %. Using the five best algorithms would provide effective and accurate identification of potential cases of COVID-19.
Employing the proposed real-time framework could potentially reduce the impact of communicable diseases, as well as mortality rates through early detection of cases. This framework would also provide the ability to follow up on recovered cases, and a better understanding the disease.