key: cord-1015772-a8bxgt55 authors: Barbosa, V. A. d. F.; Gomes, J. C.; de Santana, M. A.; Albuquerque, J. E. d. A.; de Souza, R. G.; de Souza, R. E.; dos Santos, W. P. title: Heg.IA: An intelligent system to support diagnosis of Covid-19 based on blood tests date: 2020-05-18 journal: nan DOI: 10.1101/2020.05.14.20102533 sha: 61230a43f30a0c75f37efbb37dc18d429b9f88a3 doc_id: 1015772 cord_uid: a8bxgt55 A new kind of coronavirus, the SARS-Cov2, started the biggest pandemic of the century. It has already killed more than 250,000 people. Because of this, it is necessary quick and precise diagnosis test. The current gold standard is the RT-PCR with DNA sequencing and identification, but its results takes too long to be available. Tests base on IgM/IgG antibodies have been used, but their sensitivity and specificity may be very low. Many studies have been demonstrating the Covid-19 impact in hematological parameters. This work proposes an intelligent system to support Covid-19 diagnosis based on blood testing. We tested several machine learning methods, and we achieved high classification performance: 95.159% +- 0.693 of overall accuracy, kappa index of 0.903 +- 0.014, sensitivity of 0.968 +- 0.007, precision of 0.938 +- 0.010 and specificity of 0.936 +- 0.011. These results were achieved using classical and low computational cost classifiers, with Bayes Network being the best of them. In addition, only 24 blood tests were needed. This points to the possibility of a new rapid test with low cost. The desktop version of the system is fully functional and available for free use. A new kind of coronavirus started the biggest pandemic of the century. This virus received the name SARS-Cov2 to be related to severe acute respiratory syndrome coronavirus (Lin et al., 2020; Okba et al., 2020) , one of the most dangerous consequences of Coronavirus . The clinical 5 symptoms of Covid-19 patients include fever, cough, sore throat and some cases even gastrointestinal infection symptoms (Guo et al., 2020b) . In the most severe cases it can lead to shortness of breath and death. SARS-Cov2 probable origin is from a pangolin virus called Pangolin-CoV: they are 91.02% identical in whole-genome level (Zhang et al., 2020b) . The first 10 record of the SARS-Cov2 is from Wuhan, China in later December 2019. In May 2020 it have already spread to 215 countries in the world (WHO, 2020) . The virus has a stronger human-to-human transmission capacity. Until May 2020 more than 3 people million were infected and more than 250 thousands of deaths (WHO, 2020) . In this case, it is necessary quick and precise diagnosis 15 tests (Beeching et al., 2020) . The ground-truth test in Covid-19 diagnosis is the Reverse Transcription Polymerase Chain Reaction (RT-PCR) with DNA sequencing and identification (Döhla et al., 2020) . However its result needs several hours to be ready (Döhla et al., 2020) . Tests based on IgM/IgG antibodies delivers results quickly, however they 20 are nonspecific for Covid-19, and may have very low sensitivity and specificity (Patel et al., 2020; Burog et al., 2020; Egner et al., 2020; Döhla et al., 2020; Tang et al., 2020b) . IgM/IgG tests do not detect the SARS-Cov2 presence directly, CC-BY-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. The copyright holder for this preprint this version posted May 18, 2020 . . https://doi.org/10.1101 2020) because tests made in samples collected in the first week of illness have only 18.8% of sensitivity and 77.8% of specificity (Liu et al., 2020b) . Döhla et al. (2020) compared the results of IgM/IgG with reverse transcription polymerase 30 chain reaction (RT-PCR) in 59 patients and IgM/IgG tests obtained 36.4% of sensitivity and 88.9% of specificity. IgG/IgM tests performed during the second week of the disease have 100% of sensitivity and 50% of specificity (Liu et al., 2020b) . That means when the viral charge is high IgG/IgM tests reach high sensitivities and specificities. But 35 in that cases the disease is in advanced levels (Guo et al., 2020a; Hoffman et al., 2020) . Many works have been demonstrating the Covid-19 impact in cardiovascular system and hematological characteristics Tan et al., 2020; Gao et al., 2020; Liu et al., 2020a; Gunčar et al., 2018; Zheng et al., 2020) . According 40 to Turner et al. (2004) the coronaviruses, like SARS-Cov and SARS-Cov2, have as functional receptor the zinc metallopeptidase angiotensin-convertingenzyme 2 (ACE2), an enzyme presents in cell membranes of arteries, heart, lungs and other organs. ACE2 is implicated in heart function, hypertension and diabetes. Considering this fact, Zheng et al. (2020) pointed that Middle East respiratory 45 syndrome-related coronavirus (MERS-CoV) and severe acute respiratory syndrome coronavirus (SARS-Cov) can cause acute myocarditis and heart failure. Some of the coronaviruses impacts in cardiovascular system are the increase in blood pressure, and increase in troponin I (hs-cTnI) levels (Zheng et al., 2020) . Others works found that patients with Covid-19 can developed lymphopenia 50 (low level of lymphocytes in the blood) Tan et al., 2020; Liu et al., 2020a) , leukopenia (few white blood cells). They can also have decrease in their hemoglobin levels, Absolute Lymphocyte Count (ALC) and Absolute Monocyte Count (AMC) . Patients that developed severe forms of the disease have significantly higher levels of hematological character-55 istics as Interleukin-6, D-dimer than patients that developed moderate form of the Covid-19 (Gao et al., 2020) . Therefore, as Covid-19 is a disease that affects the blood, hematological exams can be used in diagnosis tests. . CC-BY-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review) The copyright holder for this preprint this version posted May 18, 2020 . . https://doi.org/10.1101 In the other hand, machine learning techniques have been used to diagnosis diseases by analyzing hematological parameters (Tanner et al., 2008; Luo et al., 60 2016; Gunčar et al., 2018) . Machine learning is a subarea of the Artificial Intelligence in Computer Science. One of the mean goals of machine learning techniques is to perform pattern detection in databases. In this way, it is necessary the development of one diagnosis support system that provide a quick result and with high sensibility even if the samples were 65 be taken in early stages of the disease. In this context, blood tests utilization have some advantages. First, they are commonly used during medical screening. Besides that blood tests do not take too long to be ready and they have low price compared with other diagnosis methods. In this work, we propose a diagnosis support system of the Covid-19 based 70 in machine learning techniques. This pioneering system uses blood tests to diagnose Covid-19. We used the database provided by Hospital Israelita Albert Einstein located in São Paulo, Brazil. The database contains data from 5644 patients among them 559 patients were diagnosis with Covid-19 by using the gold standard method, the reverse transcription polymerase chain reaction (RT-75 PCR) (Kaggle, 2020) . More than one hundred laboratory exams are available in the database like blood counts and urine test. Thus, aiming to provide a quick diagnosis we performed the reduction of exams by choosing which tests are most relevant to the diagnosis. Firstly we made it by using attribute selection algorithms based on Evolutionary Search (ES) (Liang et al., 2000; Kim et al., 80 2000) and Particle Swarm Optimization (PSO) (Kennedy & Eberhart, 1995; Poli et al., 2007; Wang et al., 2007) . In the following, we made a hand reduction aiming to obtain the lower test price, small period of time required to the exams to be ready and the lower amount of blood samples needed. Finally, we obtained a database with 24 blood tests. According to empirical information 1 , 85 these exams may have turnaround time of 30 to 60 minutes in an emergency 1 According to the Brazilian Society of Clinical Analysis, there is no reference document to establish standard turnaround times for the exams described above. . CC-BY-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review) The copyright holder for this preprint this version posted May 18, 2020 . . https://doi.org/10.1101 context. So our proposal can be used as a rapid test. We performed several experiments with different machine learning techniques as Multilayer Perceptron (Rosenblatt, 1958; Haykin, 2001) , Support Vector Machine (Boser et al., 1992; Cortes & Vapnik, 1995) , Random Trees, 90 Random Forest (Breiman, 2001; Geurts et al., 2006) , Bayesian networks and Naive Bayes (Cheng & Greiner, 2001; Haykin, 2001) and evaluated their results. Experiments show that Bayesian networks has superior performance with respect to other techniques. In order to choose this method, we considered six parameters: accuracy, sensibility, specificity, precision, recall, and kappa index. This paper is organized as follows: Section 2 discuss some related works that found that Covid-19 can affect hematological characteristics. Section 3 presents the Kaggle database and reviews the theoretical machine learning methods concepts necessary to understand this work. It is also described how we manipulated Kaggle database and how we performed the experiments. Section 4 shows 100 and analyzes the experimental results and the resulting desktop application we developed. We finalized the paper in section 6 with the conclusions. Several studies have shown the importance of blood tests for diagnosis and indicative of the degree of severity of Covid-19. Fan et al. (2020) analyzed 105 hematological indexes of 69 patients with Covid-19. All of them were treated at the National Center for Infectious Diseases (NCID), located in Singapore. Among these patients, 65 underwent complete blood count (CBC) on the day of admission. In addition, demographic information such as age, gender, ethnicity and location were made available for this research. 13.4% of patients needed 110 intensive care unit (ICU) care, especially the elderly. During the first exams, 19 patients had leukopenia (few white blood cells) and 24 had lymphopenia (low level of lymphocytes in the blood), with 5 cases classified as severe (Absolute Lymphocyte Count (ALC) < 0.5 × 10 9 /L). The study also pointed out that patients who needed to be admitted to the ICU had lower ALC and a higher 115 5 . CC-BY-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. The copyright holder for this preprint this version posted May 18, 2020. . https://doi.org/10.1101/2020.05.14.20102533 doi: medRxiv preprint rate of Lactate Dehydrogenase (LDH). These data indicated that monitoring these parameters can help to identify patients who need assistance in the ICU. Also considering 9 patients who were in the ICU, the authors observed that the patients had a significant decrease in their hemoglobin levels, ALC and Absolute Monocyte Count (AMC) levels compared to the non-ICU group. ICU patients 120 also tend to neuthophilia. The platelet count did not prove to be a factor for discrimination between the type of hospitalization. Tan et al. (2020) also looked at complete blood count of patients (cured ones and also 12 patients who died from . The authors sought to obtain key indicators of disease progression, as a way of supporting future clin-125 ical management decisions. In the case of patients who died, blood tests were monitored continuously throughout the treatment process. As in the previous study, the authors observed lymphopenia in this group. Based on this, the study then outlined a model (Time-LYM% model, TLM) for classifying disease severity and predicting prognosis. Thus, the blood lymphocyte percentage 130 (LYM%) was divided into two cases, considering the first 10-12 days of symptoms: LYM% > 20% are classified as moderate cases and with a high chance of recovery. LYM% < 20% are classified as severe cases. In a second exam, 17-18 days after the first symptoms, patients with LYM% > 20% are recovering, patients with 5 30 times/min, or PaO 2 /FiO 2 < 300 mmHg. 27 patients were classified in the first group, while 13 were classified in the second. The student reported that levels of fibrinogen, D-dimer, total bilirubin, aspartate transaminase, ala-175 nine transaminase, lactate dehydrogenase, creatine kinase, C-reactive protein (CRP), ferritin and serum amyloid A protein were significantly higher in the se-7 . CC-BY-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. The copyright holder for this preprint this version posted May 18, 2020. . https://doi.org/10.1101/2020.05.14.20102533 doi: medRxiv preprint vere group. Futhermore, most severe patients presented lymphopenia, that can be related to the significantly decreased absolute counts of T cells, especially CD8+ T cells, while white blood cells and neutrophils counts were higher. 8 . CC-BY-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. The copyright holder for this preprint this version posted May 18, 2020. . https://doi.org/10.1101/2020.05.14.20102533 doi: medRxiv preprint In this work we explore, evaluate and analyze the performance of various machine learning techniques to predict Covid-19 diagnosis based on different clinical exams configurations. In addition, we also propose an intelligent system in a desktop application format. In this work we propose a support system for Covid-19 detection using clinics blood exams called Heg.IA. Heg.IA is a smart system pioneered in the rapid detection of Covid-19 through blood tests. The basic operation of this system is: in emergency situations, the medical team should order some blood exams of patients that have characteristic symptoms of Covid-19; with the results 215 in hands the healthcare professional could insert them in a desktop system. In the following, the system will inform whether the patient is infected with Covid-19 or not. The result will be presented with the respectively classification probabilities, helping physicians to making their final decision. Figure 1 shows a general schematic of the solution. 220 Figure 1 : General proposal to diagnostic support system for the detection of Covid-19. Patients with symptoms of Covid-19 should go to health centers. The medical team must ask blood tests. Then, the results can be entered into the Heg.IA system, which will indicate if the patients is infected with SARS-Cov2. For the development of this project, we used the database provided by Hospital Israelita Albert Einstein located in São Paulo, Brazil. The database was 9 . CC-BY-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. The copyright holder for this preprint this version posted May 18, 2020. . https://doi.org/10.1101/2020.05.14.20102533 doi: medRxiv preprint made available in the competition format (Kaggle, 2020) . The database contains the results of more than one hundred laboratory exams, such as blood 225 count, tests for the presence of viruses such as influenza A, and urine tests, of 5644 patients. Among these patients, 559 of them are infected with SARS-Cov2. The Covid-19 diagnosis were made with reverse transcription polymerase chain reaction (RT-PCR) with DNA sequencing and using additional laboratory tests during a visit to the hospital (Kaggle, 2020) . The clinical data provided in the 230 data were normalized to have mean of zero and standard deviation one (Kaggle, 2020) . In order for the data provided in the database to be used as input parameters for a machine learning method, it was necessary to assign integer numeric values 235 to the columns containing categorical data. These columns have results of exams for detecting whether a pathogen is present or not or the appearance of patient's urine, for example. Besides that, considering that 90,1% of data is from healthy patients it is reasonable to assume that missing values are within the normal range. In this way, for the parameters about the presence of pathogens it was assigned the value zero (0) for pathogens' absence and one (1) A, it was assigned the value 0 for the not detected cases and 1 for abnormalities detected, and the value 2 was used for missing values. . CC-BY-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. The copyright holder for this preprint this version posted May 18, 2020. . https://doi.org/10.1101/2020.05.14.20102533 doi: medRxiv preprint The changes made to the attributes pertaining to urine tests followed the same pattern of the pathological examinations. Thus, for the attributes Urine- were filled with the mean. This is due to our presumption that most patients in the database set are healthy. So we assumed that the mean is within in normal 270 range. Besides that, the low number of patients with Covid-19 in the database might bias the classification to the majority class (healthy patients class). In view of that, we performed a synthetic balancing by using Synthetic Minority Oversampling TEchnique (SMOTE). It is an oversampling technique for generating 275 synthetic samples from the minority class. SMOTE uses linear combinations of two similar samples to construct new data (Blagus & Lusa, 2013) . After changing categorical data and handle with missing values it was possible to build in up a database used to predict Covid-19 diagnosis. The database constructed during the pre-processing was submitted to feature selection using Particle Swarm Optimization (PSO) (Kennedy & Eberhart, 1995; Poli et al., 2007; Wang et al., 2007) and Evolutionary Search (ES) (Liang et al., 11 . CC-BY-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. The copyright holder for this preprint this version posted May 18, 2020. . https://doi.org/10.1101/2020.05.14.20102533 doi: medRxiv preprint 2000; Kim et al., 2000) . Both using 20 individuals and 500 iterations. The goal of the attribute selection is to find which exams are more relevant for classification 285 tasks and also to reduce the number of required exams for diagnostic support and consequently its price. Thus the solution can be extend to public healthcare center with low costs. We chose to use PSO and ES algorithms, since they are well established methods for feature selection. Both feature selection methods are widely used After selecting attributes with PSO and ES, a last selection was made manually. This aims to reduce the number of tests required for the diagnosis and speeding up the process. Consequently, we have also achieved a reduction in exam costs. The selection was made based on the prices of each of the listed 305 exams. They were removed one by one, and the performance of the classification was evaluated at each step. Thus, it was possible to significantly decrease the number of attributes, with minor impacts in the performance of the system. Finally, a fourth database was generated with only 24 attributes. The base was named SARS-CoV2 (CheapExams). This complete process is described in the 310 diagram in Figure 2. 12 . CC-BY-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. The copyright holder for this preprint this version posted May 18, 2020. . https://doi.org/10.1101/2020.05.14.20102533 doi: medRxiv preprint Figure 2 : Description of feature extraction process: PSO and ES algorithms were applied to the original database, resulting in 63 attributes. In the following, 24 attributes were selected manually with a lower total cost and with a performance similar to the preliminary database. In 1958, Frank Rosenblatt (Rosenblatt, 1958) proposed the perceptron model for supervised learning. Rosenblatt was psychologist and one of the pioneers in 315 the concept of artificial neural networks. His perceptron model is the simplest form of neural network used for binary classifications of linearly separable patterns. It consists of a single neuron with adjustable synaptic weights and a bias (Haykin, 2001) . Multilayer Perceptron (MLP) is a generalization of the single layer percep-320 13 . CC-BY-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. The copyright holder for this preprint this version posted May 18, 2020. . https://doi.org/10.1101/2020.05.14.20102533 doi: medRxiv preprint tron. It consists of a feed-foward network with an input layer, hidden layers and one output layer. The addition of hidden layers allows to the network the ability to classify more complex problems than single layer perceptron such as image classification (Lerner et al., 1994; Phung et al., 2005; Barbosa et al., 2020) . MLP training is performed in a supervised way, through the error correction 325 learning rule. This rule adjusts the synaptic weights in a way that the network output becomes closer to the expected output. This method usually uses an error backpropagation algorithm to adjust these weights. Based on a gradient descent, backpropagation proceeds in two phases: propagation and backpropagation. In the propagation phase, an output is obtained for a given input 330 pattern. In backpropagation phase, an error is calculate using the desired output and the output obtained in the previous phase. Then, the error is used to update the connection weights. Thus backpropagation aims to iteratively minimize the error between the network output obtained and the desired output (Haykin, 2001) . Lima et al., 2014; Silva et al., 2020; Cordeiro et al., 2017 Cordeiro et al., , 2016 de Lima et al., 2014; Cruz et al., 2018) , and multiple sclerosis diagnosis support (Commowick et al., 2018) . Created by Vladimir Vapnik and Alexey Chervonenkis (Boser et al., 1992; 345 Cortes & Vapnik, 1995) , in 1963, the support vector machine (SVM) perform a nonlinear mapping on the database in a space of high dimension called feature space. So the algorithm builds a linear decision surface, called hyperplane, to separate distinct classes (Cortes & Vapnik, 1995) . SVMs have been widely used in several medical applications, e.g. breast cancer diagnosis over breast thermog-350 14 . CC-BY-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. The copyright holder for this preprint this version posted May 18, 2020. . https://doi.org/10.1101/2020.05.14.20102533 doi: medRxiv preprint raphy (de Vasconcelos et al., 2018; Pereira et al., 2020b; Santana et al., 2020) and mammography images (de Lima et al., 2016; Lima et al., 2015; de Lima et al., 2014; Silva et al., 2020; Cordeiro et al., 2017 Cordeiro et al., , 2016 de Lima et al., 2014; Cruz et al., 2018) . Thus, the training process of a support vector machine aims to find the 355 hyperplane equation which maximizes the distance between it and the nearest data point. That hyperplane is called optimal hyperplane (Haykin, 2001) . This machine uses support vector learning, which is a subset of the training data. SVM algorithm is well known for its ability to provide good generalization performance (Haykin, 2001) . However, this performance may decrease by 360 increasing the complexity of the hyperplane. The type of the machine varies with the type of kernel used to build the optimal hyperplane. Table 1 shows the kernel functions used in the present study. Polynomial Decision trees are a type of supervised machine learning model. They can 365 used in classification and regression problems. In most cases, trees have nodes responsible to store information. Essentially, in a tree there are four types of nodes: root, leaf, parent and child. The starting point is the Root node that has the highest hierarchical level. One node may connect to another, establishing a parent-child relationship, in which a parent node generate a child node. The 370 terminal nodes is composed by Leaf nodes. Thus they have no children, and represent a decision. In this fashion, using such trees, the algorithm makes a decision after following a path that starts from the root node and reaches a leaf node. There are several types of decision trees. They usually differ from the way the method goes through the tree structure. Random Tree and Random 375 15 . CC-BY-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. The copyright holder for this preprint this version posted May 18, 2020. . https://doi.org/10.1101/2020.05.14.20102533 doi: medRxiv preprint Forest methods are the most main ones. According to Geurts et al. (2006) Random Tree algorithm uses a tree built by a stochastic process. This method considers only a few randomly selected features in each node of the tree. In the other hand, Random Forest algorithm, consists in a collection of trees. Bayes Net and Naive Bayes are classifiers based on Bayes' Decision Theory. They are also called the test procedure by the Bayes hypothesis. Bayesian classifiers seek to find a minimum mean risk. By considering a set of correct decisions and a set of incorrect decisions, they use conditional probability to create the data model. The product of the frequency of each decision with the cost involved in making the decision results in the weights (Haykin, 2001) . Bayesian networks behave like a linear classifier for a Gaussian distribution. Its behavior is comparable to that of a single layer perceptron. In the standard Bayes Network algorithm, it assesses the probability of occurrence of a class from the values given by the others. Thus, this method assumes dependence between the features. Naive Bayes, in turn, considers that 395 all features are independent of each other, being only connected to the class (Cheng & Greiner, 2001) . This method does not allow dependency between features. Considering this assumption represents an unrealistic condition, the algorithm is considered "naive". The experiments were made by using the following techniques: SVM with polynomial kernel of degree (E) 1, 2, and 3 and RBF kernel with γ of 0.01; MLP with 50 and 100 neurons in hidden layer; Random Forest with 10, 20, 30, . . . , 100 trees; Random Tree; Naive Bayes; Bayesian Network. As a evaluate 16 . CC-BY-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. The copyright holder for this preprint this version posted May 18, 2020. . https://doi.org/10.1101/2020.05.14.20102533 doi: medRxiv preprint method we choose to perform a 10-fold cross validation and each configuration 405 was executed 25 times. We chose six metrics to evaluate the performance of diagnostic tests: accuracy, precision, sensitivity, specificity, recall, and precision. Accuracy is the probability that the test will provide correct results, that is, be positive in sick 410 patients and negative in healthy patients. In other words, it is the probability of the true positives and true negatives among all the results. The recall and sensitivity metrics can be calculated mathematically in the same way. They are the rate of true positives, and indicate the classifier ability to detect correctly people with Covid-19. However, they are commonly used in different contexts. In machine learning context, the term Recall is common. However, in the medical world, the use of the sensitivity metric is more frequent. Precision, on the other hand, is the fraction of the positive predictions that are actually positive. Specificity is the capacity of classifying healthy patients as negatives. It is the rate of true negatives. Finally, the Kappa index is a very good measure that 420 can handle very well both multi-class and imbalanced class problems, as the one proposed here. These six metrics allow to discriminate between the target condition and health, in addition to quantifying the diagnostic exactitude (Borges, 2016) . They can be calculated according to the equations in Table 2 . In Table 2 , TP is the true positives, TN is the true negatives, FP is the false 425 positives, and FN the false negatives, ρ o is observed agreement, or accuracy, and ρ e is the expected agreement, defined as following: (1) During the features selection procedure, we first performed selections based 430 on PSO and ES algorithms. The features selected by both methods resulted 17 . CC-BY-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. The copyright holder for this preprint this version posted May 18, 2020. . https://doi.org/10.1101/2020.05.14.20102533 doi: medRxiv preprint Table 2 : Metrics used to evaluate classifiers performance: overall accuracy, sensitivity (recall), precision, specificity, and kappa index in equivalent classification performances, as described in Table 3 This section presents the results obtained in the classification phase. Tables 4 and 5 show the results of mean and standard deviation for all studied classifiers. Table 5 shows the results for the reduced database, with 24 cheaper exams. Figure 4 presents the results of accuracy of these methods, while Figure 5 shows the results of kappa index. Both graphs contain statistical information from the 25 repetitions performed 450 18 . CC-BY-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. The copyright holder for this preprint this version posted May 18, 2020. . https://doi.org/10.1101/2020.05.14.20102533 doi: medRxiv preprint Figure 3 : Description of the attributes in each of the bases used. Initially, the original database had 108 exams or attributes. After applying the PSO method for extracting attributes, a second base was formed with 63 attributes. Finally, 24 exams were selected manually for each configuration. As previously mentioned, 10 folds cross-validation was used in all tests. From the results in Figures 4 and 5 it is possible to see that Bayes Net method overcame the others. Therefore, in Table 3 , we compare the results of this method to the complete database and the two databases with reduced 455 amount of exams. . CC-BY-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. The copyright holder for this preprint this version posted May 18, 2020. . https://doi.org/10.1101/2020.05.14.20102533 doi: medRxiv preprint The prototype of the developed system is fully functional in a desktop version. It works like this: The health professional will be able to type the test results in the application. In this first version of the system, the exams must 460 be entered in the unit indicated on the screens. Figures 6 and 7 show the list of exams with their respective fields. Figure 6 shows general exams, while Figure 7 exams belonging to the blood count. After completing the exams, the professional can select the "predict" option. Although the system works more efficiently with all fields filled in, it will also provide prediction with missing 465 20 . CC-BY-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. The copyright holder for this preprint this version posted May 18, 2020. exams. Finally, it is possible to view the screen in Figure 8 , where the positive or negative diagnosis for Covid-19 is presented. In addition to the diagnosis, the screen presents the values of the main classification metrics, helping the professional in his decision making. On the screen it is also possible to view results to predict hospitalization. This information is nearing completion, and 470 the full system will be presented in a near future. Knowing that the classification method was trained with normalized database. Our desktop application rescales the data to fit with this data. The rescaling is made considering the reference values of each exams. So we could estimate each new value according the normalization. The code for this desktop version is freely available for non-commercial purpose on Github repository: github.com/Biomedical-Computing-UFPE/Heg. The initial list of blood tests is quite extensive. In the context of researching is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. The copyright holder for this preprint this version posted May 18, 2020 . . https://doi.org/10.1101 pandemic. They could lead to long periods of analysis. This highlights the need to apply methods to select the most important attributes. In this way, during the feature selection phase our method was able to reduce 490 22 . CC-BY-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. The copyright holder for this preprint this version posted May 18, 2020 . . https://doi.org/10.1101 the amount of features (exams) in more than 20%. This was an important achievement, since it reduces the amount of required procedures. Therefore resulting in less expensive and less time-consuming diagnostic process. . CC-BY-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. The copyright holder for this preprint this version posted May 18, 2020 May 18, . . https://doi.org/10.1101 May 18, /2020 doi: medRxiv preprint For the classification stage, Figures 4 and 5 show that, overall, Bayes Net method overcame the others in accuracy, which was greater than 95%, and in 495 kappa statistic, reaching more than 0.90. All tested configurations of Random Forest also showed good performance, with accuracies around 95% and kappa close to 0.90. Naive Bayes algorithm performed slightly worse than these others, but still achieving great results for both accuracy and kappa. SVM, MLP and Random Tree classifiers, on the other hand, achieved less impressive results, 500 with accuracies around 90% and kappa between 0.75 and 0.85. As for the data dispersion, it was slightly greater for kappa results, when compared to accuracy. However, both graphs show low dispersion, indicating good reliability of the system. The superior results of the Bayes network may indicate or confirm the fea-505 tures (exams) are statistically independent or, at least, preserve a low level of 24 . CC-BY-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. The copyright holder for this preprint this version posted May 18, 2020 May 18, . . https://doi.org/10.1101 May 18, /2020 doi: medRxiv preprint interdependence. Therefore, even though all 24 selected exams showed to be relevant to diagnose SARS-Cov2, our hypothesis is that they could exhibit some degree of independence from each other. The results presented in Table 3 show the classification performance using 510 Bayes Net among the three databases: with the complete set of exams (original database), with features selected by PSO and the one including just the cheaper exams. The table shows the average and standard deviation values for all six metrics: accuracy, kappa statistic, recall, sensibility, precision and specificity. By comparing the results of all databases, we observed a minimal reduction 515 in accuracy, recall and sensitivity with the decrease of the amount of features. All these metrics showed a decrease lower than 4%, when using only the cheap exams. For precision and specificity, the reduction for 24 exams led to a decrease of around 5%. The selection of these exams triggered a reduction of 8% in kappa 25 . CC-BY-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. The copyright holder for this preprint this version posted May 18, 2020. . https://doi.org/10.1101/2020.05.14.20102533 doi: medRxiv preprint Lippi & Plebani (2020) also summarized the main contributions of laboratory 530 tests to Covid-19. Among them are those of albumin, aspartate transaminase, alanine transaminase, bilirubin, lactate dehydrogenase and leukocytes. These same exams were selected by the methods in our work, confirming the relevance 26 . CC-BY-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. The copyright holder for this preprint this version posted May 18, 2020. . https://doi.org/10.1101/2020.05.14.20102533 doi: medRxiv preprint of the results obtained. The study of Huang et al. (2020) also showed cases of leukopenia and lymphopenia. This may indicate a decreased immunological 535 response to the virus. On the other hand, the potential clinical significance of the increased value of aminotransferases and bilirubin aligned with low albumin values is a liver injury. Wan et al. (2020) suggest that these changes in the severe patients were more obvious. Liver damage might be directly caused by the viral infection of liver cells (Zhang et al., 2020a) . High levels of lactate 540 dehydrogenase can be related to pulmonary injury and/or widespread organ damage (Lippi & Plebani, 2020) . In addition, Lippi & Plebani (2020) believes that increased monocytes levels can show a severe viral infection. These results support the idea that Covid-19 can causes damages beyond hematological and respiratory issues. Examples are multi-organ failure (MOF) 545 and its complications, and intravascular coagulopathy (Lippi et al., 2020) . These results highlight the importance of diagnosis based on clinical examinations. A new kind of coronavirus, SARS-Cov2, started the biggest pandemic of the century. This virus has a stronger human-to-human transmission capacity, and 550 has already led to millions of infected people and thousands of deaths. One of the main strategies to fight the pandemic is testing in a precise and quick way (WHO, 2020 Considering this, the development of a diagnosis support system to provide fast results with high sensitivity and specificity is necessary and urgent. In 27 . CC-BY-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. The copyright holder for this preprint this version posted May 18, 2020. . https://doi.org/10.1101/2020.05.14.20102533 doi: medRxiv preprint this context, blood tests have some advantages. First, they are commonly used during medical screening. Besides that blood tests are less expensive and less time-consuming than other diagnosis methods. Thus providing a more accessible 565 system. By combining these blood tests results to analysis based on Artificial Intelligence, we were able to provide a robust, efficient and easily available system to diagnose Covid-19. We optimized the system by reducing the amount of required exams, based on their relevance to describe the diagnosis problem and on their price and avail-570 ability worldwide, specially in low-income communities. Firstly we performed an automatic exam selection using Particle Swarm Optimization (PSO) method. Then, we manually chose some exams aiming to reach an optimal combination of price, time and number of procedures. This procedure resulted in 24 blood tests, which can be delivered in up to one hour. Since the computational clas-575 sification can be performed in milliseconds, with the 24 blood tests results, a technician can get diagnostic results relatively fast. The user just have to fill in the electronic form with these 24 blood tests results. By using a computationally simple method, based on the classical Bayesian networks, we were able to achieve high diagnosis performance: 95.159% ± 0.693 580 of overall accuracy, kappa index of 0.903 ± 0.014, sensitivity of 0.968 ± 0.007, precision of 0.938 ± 0.010 and specificity of 0.936 ± 0.011. If compared to deeplearning based methods, the proposed system also reduces computational cost. More importantly, our approach provides a possible way out for the tests availability issue in the context of Covid-19. The availability of this software 585 system combined to low cost and fast tests, based on blood analysis, may be of great help to overcome the testing challenges being experienced worldwide. Less-favored countries and communities can especially benefit from this solution. With this system we may be able to expand access to effective testing and thereby reach and save more people. 28 . CC-BY-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review) The copyright holder for this preprint this version posted May 18, 2020. . https://doi.org/10.1101/2020.05.14.20102533 doi: medRxiv preprint 29 . CC-BY-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review) The copyright holder for this preprint this version posted May 18, 2020. . https://doi.org/10.1101/2020.05.14.20102533 doi: medRxiv preprint . CC-BY-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review) The copyright holder for this preprint this version posted May 18, 2020. . https://doi.org/10.1101/2020.05.14.20102533 doi: medRxiv preprint a multilayer perceptron neural network. In Proceedings of 1994 IEEE International Conference on Neural Networks (ICNN'94) (pp. 3540-5). IEEE volume 6. Li, Z., Yi, Y., Luo, X., Xiong, N., Liu, Y., Li, S., Sun, R., Wang, Y., Hu, B., Chen, W. et al. (2020) . Development and clinical application of a rapid 695 igm-igg combined antibody test for sars-cov-2 infection diagnosis. Journal of medical virology, . . CC-BY-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review) The copyright holder for this preprint this version posted May 18, 2020. . https://doi.org/10.1101/2020.05.14.20102533 doi: medRxiv preprint 1 . Lippi, G., Plebani, M., & Henry, B. M. (2020) . Thrombocytopenia is associated with severe coronavirus disease 2019 infections: A meta-analysis. Clinica Chimica Acta, . . CC-BY-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review) The copyright holder for this preprint this version posted May 18, 2020. . https://doi.org/10.1101/2020.05.14.20102533 doi: medRxiv preprint . CC-BY-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review) The copyright holder for this preprint this version posted May 18, 2020. . https://doi.org/10.1101/2020.05.14.20102533 doi: medRxiv preprint Deep-wavelet neural networks for breast cancer early diagnosis using mammary termographies Deep Learning for Data Analytics: Foundations, Biomedical Applications, and Challenges Covid-19: testing times Smote for high-dimensional class-imbalanced data Medidas de acurácia diagnóstica na pesquisa cardiovascular A training algorithm for optimal margin classifiers Random forests Should IgM/IgG rapid test kit be used in the diagnosis of COVID-19? Asia Pacific Center for Evidence Based Healthcare Learning Bayesian belief network classifiers: Algorithms and System Objective evaluation of multiple sclerosis lesion segmentation using a data management and processing infrastructure A semi-supervised 630 fuzzy growcut algorithm to segment and classify regions of interest of mammographic images Analysis of supervised and semi-supervised growcut applied to segmentation of masses in mammography images Support-vector networks Rapid point-of-care testing for SARS-CoV-2 in a community screening setting shows low sensitivity Statement from RCPath's immunology specialty advisory committee on COVID /SARS CoV2 antibody evaluation. Pathology: The science behind the cure Hematologic parameters in patients with COVID-19 infection Diagnostic utility of clinical laboratory data determinations for patients with the severe COVID-19 Extremely randomized trees. Machine Learning An application of machine learning to haematological diagnosis Profiling Early Humoral Response to Diagnose Novel Coronavirus Disease (COVID-19) The origin, transmission and clinical 31 therapies on coronavirus disease 2019 (COVID-19) outbreak -an update on 670 the status Neural networks: principles and practice Evaluation of a covid-19 igm and igg rapid test; an efficient tool for assessment of past 675 exposure to sars-cov-2 Clinical features of patients infected with 2019 novel coronavirus in Wuhan, China. The Lancet Diagnosis of COVID-19 and its clinical spectrum Particle swarm optimization Feature selection in unsupervised 685 learning via evolutionary search Feature selection and chromosome classification using Evolutionary search of approximated n-dimensional landscapes Feature extraction employing fuzzy-morphological decomposition for detection and classification of mass on mammograms Annual International Conference of the IEEE Engineering in Medicine and Biology Society A methodology for classification of lesions in mammographies using zernike moments, elm and svm neural networks in a multi-kernel approach Detection and classification of masses in mammographic images in a multi-kernel approach Evaluations of serological test in the diagnosis of 2019 novel coronavirus (SARS-CoV-2) infections during the COVID-19 outbreak. medRxiv Laboratory abnormalities in patients with Covid-2019 infection Longitudinal characteristics of lymphocyte responses and cytokine profiles in the peripheral blood of SARS-CoV-2 infected patients. EBioMedicine Diagnostic indexes of a rapid igg/igm combined antibody test for sars-cov-2. 730 medRxiv Using machine learning to predict laboratory test results Sars-cov-2 specific antibody responses in covid-19 patients. medRxiv Report from the american society 740 for microbiology covid-19 international summit Method for classification of breast lesions in thermographic images using elm classifiers Nova Science Lesion detection in breast thermography using machine learning algorithms without previous segmentation Nova Science Dialectical optimization method as a feature selection tool for breast cancer diagnosis using thermographic images Understanding a Cancer Diagnosis Skin segmentation using color pixel classification: analysis and comparison Particle swarm optimization Identification of mammary lesions in thermographic images: feature selection study using ge-765 netic algorithms and particle swarm optimization The perceptron: a probabilistic model for information storage and organization in the brain Breast lesions classification in frontal thermographic images using intelligent systems and moments of haralick and zernike Breast cancer diagnosis based on mammary thermography and extreme learning machines International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review) The copyright holder for this preprint this version posted Morphological extreme learning machines applied to the detection and classification of mammary lesions Lymphopenia predicts disease severity of COVID-19: a descriptive and predictive study Abnormal coagulation parameters are associated with poor prognosis in patients with novel coronavirus 790 pneumonia The laboratory diagnosis of covid-19 infection: Current issues and challenges Decision tree algorithms predict the diagnosis and outcome of dengue fever in the early phase of illness Ace2: from vasopeptidase to sars virus receptor Analysis of methods of classification of breast thermographic images to determine their viability in the early breast cancer detection The authors are grateful to the Brazilian research agencies CAPES and CNPq, for the partial financial support of this research. All authors declare they have no conflicts of interest. This study was funded by the Brazilian research agencies CAPES and CNPq.All procedures performed in studies involving human participants were in accordance with the ethical standards of the institutional and/or national research committee and with the 1964 Helsinki declaration and its later amendments or 600 comparable ethical standards. Cruz, T., Cruz, T., . Detection and classification of lesions in mammographies using neural networks and morphological wavelets. IEEE 640 Latin America Transactions, 16 , 926-32. . CC-BY-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. The copyright holder for this preprint this version posted May 18, 2020. . https://doi.org/10.1101/2020.05.14.20102533 doi: medRxiv preprint Sun, Q., Xiong, Y. et al. (2020) . Clinical features and treatment of COVID-19 patients in northeast Chongqing. Journal of Medical Virology, . . CC-BY-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. The copyright holder for this preprint this version posted May 18, 2020. . https://doi.org/10.1101/2020.05.14.20102533 doi: medRxiv preprint . CC-BY-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. The copyright holder for this preprint this version posted May 18, 2020. . https://doi.org/10.1101/2020.05.14.20102533 doi: medRxiv preprint