Detecting COVID-19 Status Using Chest X-ray Images and Symptoms Analysis by Own Developed Mathematical Model: A Model Development and Analysis Approach

: COVID-19 is a life-threatening infectious disease that has become a pandemic. The virus grows within the lower respiratory tract, where early-stage symptoms (such as cough, fever, and sore throat) develop, and then it causes a lung infection (pneumonia). This paper proposes a new artiﬁcial testing methodology to determine whether a patient has been infected by COVID-19. We have presented a prediction model based on a convolutional neural network (CNN) and our own developed mathematical equation-based algorithm named SymptomNet. The CNN algorithm classiﬁes lung infections (pneumonia) using frontal chest X-ray images, and the symptom analysis algorithm (SymptomNet) predicts the possibility of COVID-19 infection from the developed symptoms in a patient. By combining the CNN image classiﬁer method and SymptomNet algorithm, we have developed a model that predicts COVID-19 patients with an approximate accuracy of 96%. Ten out of the 13 symptoms were signiﬁcantly correlated to the COVID-19 disease. Specially, fever, cough, body chills, shortness of breath, muscle pain, and sore throat were shown to be signiﬁcantly related ( r = 0.20; p = 0.001, r = 0.20; p < 0.001, r = 0.22; p < 0.001, r = 0.16; p < 0.001, r = − 0.45; p < 0.001, r = − 0.35; p < 0.001, respectively). In this model, the CNN classiﬁer has an accuracy of approximately 96% (training loss = 0.1311, training accuracy = 0.9596, validation loss: 0.2754, and validation accuracy of 0.9273, F1-score: 94.16, precision: 91.33), and the SymptomNet algorithm has an accuracy of 97% (485 successful predictions out of 500 samples). This research work obtained promising accuracy while predicting COVID-19-infected patients. The proposed model can be ubiquitously used at a low cost and achieve high accuracy.


Introduction
The new coronavirus carried by bats called COVID-19 has become a pandemic and has created a dreadful situation worldwide. The virus became dangerous at the end of November 2019 when it underwent a mutation, evolving into the viral strain that we now call SARS-CoV-2 [1]. According to the WHO, there is no alternative to detect this disease other than testing [2]. We have developed a solution that combines deep learning and our own proprietary mathematical equation-based algorithm named SymptomNet. This method might help to accelerate the mission of predicting and identifying possible COVID-19 patients. This study proposed a model to predict COVID-19 patients in the early stages by applying a deep learning-based Convolutional Neural Network (CNN) algorithm to frontal chest X-ray images, which is coupled with our own proprietary symptom analysis algorithm (SymptomNet). According to a study from the UK's King's College London, there could be six distinct types of COVID-19, and each type could be distinguished by its own cluster of symptoms [3]. (3 × 3, 16), ConV 2D (3 × 3, 32), ConV 2D (3 × 3, 64), ConV 2D (3 × 3, 128), and ConV 2D (3 × 3, 256) layers, where 3 × 3 is the kernel size, 16,32,64,128, and 256 are the respective filter sizes and 2×2 is the pooling size with the ReLU activation function, and one FC (Fully Connected) layer. The frontal chest X-ray images are used as the input images. They pass through filters, the ReLU activation function, and the sigmoid activation function to increase the nonlinearity. After this pooling layer is applied to each feature map and the pooled images are flattened into one long vector, then this vector will be the input of a fully connected artificial neural network. Through these preprocessing steps, the system will be trained by forward-and backpropagation for a large number of epochs. After several steps, the system can identify normal or infected lungs from X-ray images (pneumonia). The "Adam optimizer" algorithm has been used to update the weight parameters to optimize the loss function. The following is a summary of the main model; the details will be described in the methodology.
In the symptom analysis step, the SymptomNet algorithm with two mathematical linear equations is developed to analyze the symptoms. The first equation helps to predict the status of the COVID-19 patient based on the symptoms that they have developed. The other equation is derived to set the threshold point for the first equation. Then, the algorithm predicts whether a patient has COVID-19 or not. The details will be described in the methodology section.
After obtaining the results from the CNN algorithm and SymptomNet algorithm, this study will predict whether a person has COVID-19. The final symptom analysis test was performed on a dataset of 500 COVID-19-positive patients, which was collected manually in Bangladesh. Among these 500 patients, we also collected 10 patients' frontal chest X-ray images to test our final model.
To conduct the image processing, we used the Keras deep learning framework with the TensorFlow backend [25]. We ran all the experiments on a laboratory standard PC with an Nvidia GeForce GTX 1080 GPU card with 8 GB GDDR5X memory.

Proposed CNN Model
The CNN model combines an input layer and an output layer with hidden layers between them. The hidden layers normally comprise convolutional layers, ReLU layers, pooling layers, and fully connected layers. A classic CNN architecture would look something like the following Figure 1. transmission with our system, which has an attractive accuracy rate of approximately 96%.

Materials and Methods
A deep learning-based convolutional neural network (CNN) has been used, and the CNN consists of 7 layers: one input layer; 5 hidden layers, which are the ConV 2D (3 × 3, 16), ConV 2D (3 × 3, 32), ConV 2D (3 × 3, 64), ConV 2D (3 × 3, 128), and ConV 2D (3 × 3, 256) layers, where 3 × 3 is the kernel size, 16,32,64,128, and 256 are the respective filter sizes and 2×2 is the pooling size with the ReLU activation function, and one FC (Fully Connected) layer. The frontal chest X-ray images are used as the input images. They pass through filters, the ReLU activation function, and the sigmoid activation function to increase the nonlinearity. After this pooling layer is applied to each feature map and the pooled images are flattened into one long vector, then this vector will be the input of a fully connected artificial neural network. Through these preprocessing steps, the system will be trained by forward-and backpropagation for a large number of epochs. After several steps, the system can identify normal or infected lungs from X-ray images (pneumonia). The "Adam optimizer" algorithm has been used to update the weight parameters to optimize the loss function. The following is a summary of the main model; the details will be described in the methodology.
In the symptom analysis step, the SymptomNet algorithm with two mathematical linear equations is developed to analyze the symptoms. The first equation helps to predict the status of the COVID-19 patient based on the symptoms that they have developed. The other equation is derived to set the threshold point for the first equation. Then, the algorithm predicts whether a patient has COVID-19 or not. The details will be described in the methodology section.
After obtaining the results from the CNN algorithm and SymptomNet algorithm, this study will predict whether a person has COVID-19. The final symptom analysis test was performed on a dataset of 500 COVID-19-positive patients, which was collected manually in Bangladesh. Among these 500 patients, we also collected 10 patients' frontal chest Xray images to test our final model.
To conduct the image processing, we used the Keras deep learning framework with the TensorFlow backend [25]. We ran all the experiments on a laboratory standard PC with an Nvidia GeForce GTX 1080 GPU card with 8 GB GDDR5X memory.

Proposed CNN Model
The CNN model combines an input layer and an output layer with hidden layers between them. The hidden layers normally comprise convolutional layers, ReLU layers, pooling layers, and fully connected layers. A classic CNN architecture would look something like the following Figure 1.  Figure 2 shows the implemented CNN model architecture, which combines two main parts: the feature extractors and the classifier (sigmoid activation function). In the feature extraction layers, the input that has been taken is its immediately preceding layer's output,  Figure 2 shows the implemented CNN model architecture, which combines two main parts: the feature extractors and the classifier (sigmoid activation function). In the feature extraction layers, the input that has been taken is its immediately preceding layer's output, and the output of the layer is passed to the succeeding layers as the input. The CNN architecture in Figure 2 is combined with the convolution, max pooling, and classification layers. We have used five convolutions and a fully connected layer between the input layer and output layer. The feature extractors include a conv2D with a 3 × 3 kernel size and 16 filters, a conv2D with a 3 × 3 kernel size and 32 filters, a conv2D with a 3 × 3 kernel size and 64 filters, a conv2D with a 3 × 3 kernel size and 128 filters, and a conv2D with a 3 × 3 kernel size and 256 filters 256; and there are ReLU activators between them. and the output of the layer is passed to the succeeding layers as the input. The CNN architecture in Figure 2 is combined with the convolution, max pooling, and classification layers. We have used five convolutions and a fully connected layer between the input layer and output layer. The feature extractors include a conv2D with a 3 × 3 kernel size and 16 filters, a conv2D with a 3 × 3 kernel size and 32 filters, a conv2D with a 3 × 3 kernel size and 64 filters, a conv2D with a 3 × 3 kernel size and 128 filters, and a conv2D with a 3 × 3 kernel size and 256 filters 256; and there are ReLU activators between them.

Symptom Analysis Using the Proposed SymptomNet Algorithm
Based on 53,000 patient data samples [24], 12 symptoms have been found that are mainly responsible for COVID-19 identification. Fever, cough, fatigue, shortness of breath, and muscle pain are the top five symptoms of COVID-19. Chill, dizziness, headache, sore throat, nausea or vomiting, diarrhea, and nasal congestion can also when a person is infected by COVID-19. Figure 3 provides an overview of the COVID-19 symptoms. The analysis of the data sample shows that among the severe COVID-19 patients, 88.4% experience a fever, 71.1% experience coughing, 60.3% experience fatigue, 44.2% experience shortness of breath, 26% experience muscle pain, 26% experience chills, 16.1% experience dizziness, 11.3% experience headaches, 7.8% experience a sore throat, 5.9%

Symptom Analysis Using the Proposed SymptomNet Algorithm
Based on 53,000 patient data samples [24], 12 symptoms have been found that are mainly responsible for COVID-19 identification. Fever, cough, fatigue, shortness of breath, and muscle pain are the top five symptoms of COVID-19. Chill, dizziness, headache, sore throat, nausea or vomiting, diarrhea, and nasal congestion can also when a person is infected by COVID-19. Figure 3 provides an overview of the COVID-19 symptoms. and the output of the layer is passed to the succeeding layers as the input. The CNN architecture in Figure 2 is combined with the convolution, max pooling, and classification layers. We have used five convolutions and a fully connected layer between the input layer and output layer. The feature extractors include a conv2D with a 3 × 3 kernel size and 16 filters, a conv2D with a 3 × 3 kernel size and 32 filters, a conv2D with a 3 × 3 kernel size and 64 filters, a conv2D with a 3 × 3 kernel size and 128 filters, and a conv2D with a 3 × 3 kernel size and 256 filters 256; and there are ReLU activators between them.

Symptom Analysis Using the Proposed SymptomNet Algorithm
Based on 53,000 patient data samples [24], 12 symptoms have been found that are mainly responsible for COVID-19 identification. Fever, cough, fatigue, shortness of breath, and muscle pain are the top five symptoms of COVID-19. Chill, dizziness, headache, sore throat, nausea or vomiting, diarrhea, and nasal congestion can also when a person is infected by COVID-19. Figure 3 provides an overview of the COVID-19 symptoms. The analysis of the data sample shows that among the severe COVID-19 patients, 88.4% experience a fever, 71.1% experience coughing, 60.3% experience fatigue, 44.2% experience shortness of breath, 26% experience muscle pain, 26% experience chills, 16.1% experience dizziness, 11.3% experience headaches, 7.8% experience a sore throat, 5.9% The analysis of the data sample shows that among the severe COVID-19 patients, 88.4% experience a fever, 71.1% experience coughing, 60.3% experience fatigue, 44.2% experience shortness of breath, 26% experience muscle pain, 26% experience chills, 16.1% experience dizziness, 11.3% experience headaches, 7.8% experience a sore throat, 5.9% experience nausea or vomiting, 5.7% experience diarrhea, and 2.8% experience nasal congestion [24].
To predict COVID-19 based on symptoms, we have developed an algorithm with two mathematical linear equations. We have named our algorithm "SymptomNet". The equations are based on the symptom weights. Since all symptoms do not have the same impact on COVID-19, we assigned weights to each individual symptom. Regarding the weights of the individual symptoms, we considered the impact percentage of individual symptoms on COVID-19 based on the collected dataset. Table 1 presents the weights of the symptoms.
Here, w is denoted as the weight of the symptom, x is denoted as the symptom.
Based on the data sample, we considered 12 symptoms for the equation, but the equation is derived for n_th number of symptoms so that it can fit an increased/decreased number of symptoms. For Equation (1), we have considered symptom (x) as being binary, either 1 or 0. When the symptom is positive, it is 1; and when the symptom is negative, it is 0. In Equation (2), the threshold point is represented. After that point, for Equation (1), we are able to conclude that a patient is possibly COVID-19 positive. To calculate the threshold, we considered the weights of the top three symptoms of COVID-19 from the symptom weight table, which means that symptom weight Table 1 will be sorted in descending order (large to small). Equation (2) is derived to determine the threshold point for Equation (1).
T r is denoted as the threshold. Figure 4 shows the working process of the SymptomNet algorithm. This system is designed in such a way that the "symptom weight table" needs to be integrated with the system once, and then it will be updated automatically as it is input. The input parameters for the algorithm are patients' symptoms. After taking the input, Equation (1) will calculate the predicted value (C pr ) using the input and symptom weights. In addition, the threshold (T r ) value will be calculated from the "symptom weight table". If the predicted value equals or exceeds the threshold value, then the system will predict a COVID-19 infection; otherwise, it will predict that the person is not infected.
If the predicted value equals or exceeds the threshold value, then the system will predict a COVID-19 infection; otherwise, it will predict that the person is not infected.
The symptom pattern of COVID-19 can be changed. As a result, the weight of the symptoms of COVID-19 might vary from the default symptom weight table in Table 1.

Combining the CNN and SymptomNet Algorithms
In this part, we have combined our CNN image classifier and the SymptomNet algorithm. In the previous two parts, we have individually described the CNN image classifier and the SymptomsNet algorithm in detail. Figure 5 displays the architecture of the full model of our work.
If both the CNN image classifier and the SymptomsNet algorithm indicate positive results for a patient, then we can conclude that there is a high possibility that the patient is infected by COVID-19 (Table 2).
If the CNN classifier indicates that patients have a lung infection, but the equation result is under the threshold, then we can conclude that there is a moderate possibility that the patient is infected by COVID-19. Furthermore, if the CNN classifier indicates a negative result for the lung infection, but the equation result is over the threshold, then we can conclude that there is a low possibility that the patient is infected by COVID-19. The symptom pattern of COVID-19 can be changed. As a result, the weight of the symptoms of COVID-19 might vary from the default symptom weight table in Table 1.

Combining the CNN and SymptomNet Algorithms
In this part, we have combined our CNN image classifier and the SymptomNet algorithm. In the previous two parts, we have individually described the CNN image classifier and the SymptomsNet algorithm in detail. Figure 5 displays the architecture of the full model of our work.
If both the CNN image classifier and the SymptomsNet algorithm indicate positive results for a patient, then we can conclude that there is a high possibility that the patient is infected by COVID-19 (Table 2).
If the CNN classifier indicates that patients have a lung infection, but the equation result is under the threshold, then we can conclude that there is a moderate possibility that the patient is infected by COVID-19. Furthermore, if the CNN classifier indicates a negative result for the lung infection, but the equation result is over the threshold, then we can conclude that there is a low possibility that the patient is infected by COVID-19.

Data Preprocessing and Augmentation
The dataset was released by Paul Mooney and is also publicly available on the Kaggle platform [26]. This dataset contains a total of 5862 frontal chest X-ray images from people of different ages and genders. This data set is divided into three subsets, which are test, training, and validation sets. We defined two data generators, one for the training data and one for the validation data. A data generator is capable of loading the required

. Data Preprocessing and Augmentation
The dataset was released by Paul Mooney and is also publicly available on the Kaggle platform [26]. This dataset contains a total of 5862 frontal chest X-ray images from people of different ages and genders. This data set is divided into three subsets, which are test, training, and validation sets. We defined two data generators, one for the training data and one for the validation data. A data generator is capable of loading the required amount of data (a minibatch of images) directly from the source folder, converting them into training data (fed to the model) and training targets (a vector of attributes-the supervision signal). Our training data are augmented via a number of random transformations in order to prevent duplicate images, that is, the model will never see the exact same picture twice. This has been done to prevent overfitting and improve the generalization of the model. The following table represents the settings of the deployed image augmentation (Table 3). The rotation range represents the range of the random rotations of the images during training, i.e., 40 degrees. The width shift represents the horizontal image translation by 0.2%, and the height shift represents the vertical image translation by 0.2%. The ratio of the zoom range randomly zooming in on images is 0.2%. Last, the images were flipped horizontally. We have done this using "keras.preprocessing.image.ImageDataGenerator" class. This class allows for configuring random transformations and normalization operations on image data during training. In addition, instantiate generators of augmented image batches via.flow (data, labels) or.flow_from_directory (directory). Detailed documentation about this class has been provided in the Keras documentation [27]. We have used the fit_generator, evaluate_generator, and predict_generator generators with the Keras model that accepts the data generators as inputs. Our generators are able to load the required amount of data directly from the source directory. Regarding the three subsets of our data set (test, training, validation), the training directory consists of 5218 chest X-ray images, the test directory consists of 526 images, and the validation directory consists of 18 images.
For symptom analysis, we collected data on the symptoms from detailed research work on COVID-19 patients that was published in March 2020 [24]. This research [24] was based on a population infected with COVID-19 in Wuhan, China. The data sample was 53,000 patients who were infected by COVID-19. We also collected a sample of the symptom data of 500 Bangladeshi patients who tested positive for COVID-19. These data were collected manually from Bangladeshi top newspapers, by contacting patients over the phone, and from patients interviewed via social media. For example, patient 1's data (she was admitted to the Kuwait Bangladesh Friendship Government Hospital for more than 1 week) were collected over the phone by talking with the patient, and patient 3's data were collected from a Bangladeshi top newspaper [28]. Out of these 500 patients, there were 4 patients who did not have any COVID-19 symptoms. Table 4 shows five patient data points as an overview.

Applied Proposed CNN Model
The CNN algorithm resulted in an optimal solution by classifying abnormal (pneumonia labeled) and normal frontal chest X-ray images. Figure 6 provides an overview of the training, validation, and testing of the chest X-ray images.  The CNN algorithm resulted in an optimal solution by classifying abnormal (pneumonia labeled) and normal frontal chest X-ray images. Figure 6 provides an overview of the training, validation, and testing of the chest X-ray images. We conducted the experiment by following the CNN model architecture that is described in the methodology section ( Figure 2). The classifier of the model is placed at the end of the proposed convolutional neural network (CNN) model. It is essentially an artificial neural network (ANN) regularly called a dense layer. To perform computations, like any other classifier, this classifier requires individual features (vectors). Therefore, for the classifiers, the feature extractor (CNN part) output is converted into a 1D feature vector. This procedure is known as flattening. In flattening, the output of the convolution activity is flattened to create one long feature vector for the dense layer to use in its last We conducted the experiment by following the CNN model architecture that is described in the methodology section ( Figure 2). The classifier of the model is placed at the end of the proposed convolutional neural network (CNN) model. It is essentially an artificial neural network (ANN) regularly called a dense layer. To perform computations, like any other classifier, this classifier requires individual features (vectors). Therefore, for the classifiers, the feature extractor (CNN part) output is converted into a 1D feature vector. This procedure is known as flattening. In flattening, the output of the convolution activity is flattened to create one long feature vector for the dense layer to use in its last classification process. The classification layer contains three dense layers of size 512, 128, and 64, respectively, three dropout rates of 0.7, 0.5, and 0.3, a ReLU (rectified linear unit) between the three dense layers, and a sigmoid activation function that performs the classification tasks and a flattened layer. We have used the "binary_crossentropy" loss to train our model, and we have used the "adam" optimizer. Appendix A explains some of the commonly used optimizers.
The experiment was conducted many times to check, evaluate and validate the effectiveness of the proposed procedure. The parameters and hyperparameters were deliberately tuned to increase the performance of the model. This study reports only the most valid result where we have obtained different results.

Applied Proposed SymptomNet Algorithm
The experiment is constructed into two parts: the 1st part is constructed with the default "symptom weight table" (Table 1), and the 2nd part is constructed with a specific country's (Bangladesh) "symptom weight table". The threshold value of the equation is changeable because it depends on the symptoms. Since COVID-19 can mutate, it is able to change its symptomatic characteristics. The following table is derived for calculating the threshold based on our default weight Table 1.
The following Figure 7 represents the default threshold point based on Table 5. When Equation (1) crosses the threshold point, we can conclude that the patient may have a COVID-19 infection. As the result increases after the threshold, the probability of a possible COVID-19 infection will increase.
In this part, we have applied our collected Bangladeshi COVID-19-positive patient symptom dataset (see Table 4 in the data preprocessing section) to our derived Equations (1) and (2). Based on this dataset, fever was a symptom 92% of the time, the cough was a symptom 86% of the time, body chills were a symptom 78% of the time, shortness of breath was a symptom 74% of the time, muscle pain was a symptom 58% of the time, a sore throat was a symptom 52% of the time, and the other four symptoms were symptoms 2% of the time. First, we generated the symptom weight table from this dataset. The symptom weight Table 6 is shown below.  Table 7 is derived to calculate the threshold point based on the symptom weight Table 6 of Bangladeshi patients.  When Equation (1) crosses the threshold point, we can conclude that the patient may have a COVID-19 infection. As the result increases after the threshold, the probability of a possible COVID-19 infection will increase.
In this part, we have applied our collected Bangladeshi COVID-19-positive patient symptom dataset (see Table 4 in the data preprocessing section) to our derived Equations (1) and (2). Based on this dataset, fever was a symptom 92% of the time, the cough was a symptom 86% of the time, body chills were a symptom 78% of the time, shortness of breath was a symptom 74% of the time, muscle pain was a symptom 58% of the time, a sore throat was a symptom 52% of the time, and the other four symptoms were symptoms 2% of the time. First, we generated the symptom weight table from this dataset. The symptom weight Table 6 is shown below.  Table 7 is derived to calculate the threshold point based on the symptom weight Table 6 of Bangladeshi patients. The following Figure 8 represents the threshold point for Bangladeshi patients based on Table 7.  The following Figure 8 represents the threshold point for Bangladeshi patients based on Table 7.
Detailed results of the experiments are shown and described in the "Results" section.

Results
This proposed model is a combination of CNN-based frontal chest X-ray image classification and our own developed algorithm (SymptomNet). Our results are discussed in three parts. In the first two parts, we have provided the results of the individual Detailed results of the experiments are shown and described in the "Results" section.

Results
This proposed model is a combination of CNN-based frontal chest X-ray image classification and our own developed algorithm (SymptomNet). Our results are discussed in three parts. In the first two parts, we have provided the results of the individual algorithms (the CNN model and the SymptomsNet algorithm, respectively) in detail to provide a better understanding. In the last part, we have provided our full model results.
As clarified above, methods, such as data augmentation, varying the learning rate, and annealing, were used to help fit the small dataset into a deep convolutional neural network architecture. These methods were performed in order to acquire generous outcomes, as shown in Figures 9 and 10. The final results obtained are training loss = 0.1311, training accuracy = 0.9596, validation loss: 0.2754, and validation accuracy of 0.9273. The overall scenario has been shown in Figure 11.               This model's training accuracy is 95.9%, and it achieves a test accuracy of 92.467%, which indicates that it is a good model. With this model, we were able to determine lung infections (pneumonia), which is one of the major situations for COVID-19 patients.
In this part, we will show the results of our SymptomNet algorithm. We generated all the prediction results of the 500 Bangladeshi COVID-19-positive patients using Equation (1). Then, we compared the predicted results to the threshold point. The threshold point was generated using Equation (2). From the experiment, we found that this method achieved 97% (485 successful predictions out of 500) prediction accuracy. In Table 8, we have displayed the first 11 results for the 500 Bangladeshi COVID-19-positive patients.  Figures 13 and 14 are representing the correlations and p-values respectively. The role of "p" values and "r" values is to find out the best correlation and rank the feature to select the best features of the datasets [29]. The analysis of the correlation between the symptoms and COVID-19 status revealed that 10 out of 13 symptoms were significantly correlated to the COVID-19 disease. Specially, fever, cough, body chills, shortness of breath, muscle pain, sore throat were shown to be significantly related to the COVID-19 disease (r = 0.20; p = 0.001, r = 0.20; p < 0.001, r = 0.22; p < 0.001, r = 0.16; p < 0.001, r = −0.45; p < 0.001, r = −0.35; p < 0.001, respectively) from the developed symptoms in a patient. Also, the p-value curve showed strong correlations (p < 0.05) of the symptoms. p-values of other symptoms, such as fatigue, hyposmia, anorexia, kidney problem, dizziness, nausea, or vomiting are 0.319, 0.014, 0.318, 0.083, 0.001, <0.001, respectively. Figure 15 shows the graphical view of our results, where we have displayed the threshold point and the prediction results of individual patients. Patient 2 and patient 10 had the highest predicted percentages (98.28%), and patient 11 had the lowest predicted percentage (54.25%), which was below the threshold point.
According to the Canadian PHAC [30], the top symptoms of COVID-19 in Canada are fever, cough, difficulty breathing, and pneumonia in both lungs. According to the UK's NHS [31], the top symptoms of COVID-19 in the UK are cough, high temperature, and shortness of breath. According to the Australian Government Department of Health [32], the top symptoms of COVID-19 in Australia are fever, coughing, shortness of breath, sore throat, and fatigue. According to the CDC in the USA [33], they are facing similar symptoms for COVID-19. Based on the mentioned countries' health organizations, our equation is fully able to identify the possible COVID-19 patients according to their symptoms.
In this last part of the Results section, we have constructed the final results of our full model. We ran the final test on 30 COVID-19-positive patients. To test and generate the results, we used patients' frontal chest X-ray images and symptoms. These data were collected from Bangladesh. Since we are using Bangladeshi patients' data, for the "SymptomNet" algorithm, we are not using the default "symptom weight table". We are using the "symptom weight table", which was made based on Bangladeshi patients' data (see Table 9 in the Results section). Since the previous two parts of this results section have described the detailed procedure, in this section, we have shown the final output only. Table 9 shows the results. Figures 13 and 14 are representing the correlations and p-values respectively. The role of "p" values and "r" values is to find out the best correlation and rank the feature to select the best features of the datasets [29]. The analysis of the correlation between the symptoms and COVID-19 status revealed that 10 out of 13 symptoms were significantly correlated to the COVID-19 disease. Specially, fever, cough, body chills, shortness of breath, muscle pain, sore throat were shown to be significantly related to the COVID-19 disease (r = 0.20; p = 0.001, r = 0.20; p < 0.001, r = 0.22; p < 0.001, r = 0.16; p < 0.001, r = −0.45; p < 0.001, r = −0.35; p < 0.001, respectively) from the developed symptoms in a patient. Also, the p-value curve showed strong correlations (p < 0.05) of the symptoms. p-values of other symptoms, such as fatigue, hyposmia, anorexia, kidney problem, dizziness, nausea, or vomiting are 0.319, 0.014, 0.318, 0.083, 0.001, <0.001, respectively.     According to the Canadian PHAC [30], the top symptoms of COVID-19 in Canada are fever, cough, difficulty breathing, and pneumonia in both lungs. According to the UK's NHS [31], the top symptoms of COVID-19 in the UK are cough, high temperature, and shortness of breath. According to the Australian Government Department of Health [32], the top symptoms of COVID-19 in Australia are fever, coughing, shortness of breath, sore throat, and fatigue. According to the CDC in the USA [33], they are facing similar symptoms for COVID-19. Based on the mentioned countries' health organizations, our equation is fully able to identify the possible COVID-19 patients according to their symptoms.
In this last part of the Results section, we have constructed the final results of our full model. We ran the final test on 30 COVID-19-positive patients. To test and generate the results, we used patients' frontal chest X-ray images and symptoms. These data were collected from Bangladesh. Since we are using Bangladeshi patients' data, for the "SymptomNet" algorithm, we are not using the default "symptom weight table". We are using the "symptom weight table", which was made based on Bangladeshi patients' data (see Table 9 in the Results section). Since the previous two parts of this results section have described the detailed procedure, in this section, we have shown the final output only. Table 9 shows the results.

Discussion
Figures 9 and 10 show that the obtained training loss = 0.1311, training accuracy = 0.9596, validation loss = 0.2754, and validation accuracy of 0.9273 while classifying X-ray images as infected (pneumonia) and normal. Our CNN algorithm achieves a training accuracy of 95.9% ( Figure 12). The results indicate that our CNN model serves its purpose for image classification. The novel part of this research article is the SymptomNet algorithm. This algorithm is designed to predict COVID-19 patients by analyzing patients' symptoms. The SymptomNet algorithm achieves 97% accuracy at predicting COVID-19 infections. The combined model (CNN image classification and SymptomNet) provided more accurate results for COVID-19 identification. Few research articles [34][35][36] that have been published recently have focused on identifying pneumonia from X-ray images, which can indicate COVID-19 infections. Diagnosing pneumonia cannot be the sole determinant of COVID-19 identification. One research article [37] showed that 138 million children were infected with pneumonia from 2000-2015. This indicates that, per year, on average, 9.2 million children are infected by pneumonia. Therefore, COVID-19 symptom analysis is necessary along with pneumonia identification. As a result, we have developed the novel SymptomNet algorithm to provide nearly perfect results. According to our final result (Table 9), we were able to correctly identify 27 patients out of 30 with COVID-19 infections. We will attempt to collect more data to extend this research work. This model overall achieves excellent performance and is capable of identifying possible COVID-19 patients. Because of its effectiveness and short execution time at identifying possible COVID-19 patients, we believe that this model can contribute to improving the crisis of COVID-19 situations worldwide. The research work was limited by the depth of the data. Future work could further improve the determination of the threshold point. Our future work also relied on optimized model-based neural network compression [38].

Conclusions
Although the model in the current study achieves high accuracy at predicting COVID-19infected patients, there are a few limitations to consider when interpreting the results. The amount of data we use for this work was not enough to fully prove this model. We used 5300 frontal chest X-ray images for training and then classifying lung infections (COVID-19 pneumonia), but the model could be improved if the number of X-ray images increased. The X-ray images did not come directly from COVID-19-related patients, which is a drawback for this model. In the analysis of the symptoms, we have used the data of 500 patients who are COVID-19-positive to evaluate our algorithm and equations, and we have achieved 97% accuracy; however, this accuracy may be increased to near 100% if the amount of data is larger. Our main aim was to detect COVID-19 patients by our own developed mathematical model. Furthermore, the calculation of the threshold point can be further optimized with more research work. More data would be good enough to train our model to get better accuracy than we have now. Another limitation of the study was that we were not able to compare to other similar illnesses.
In summary, we have figured out a model to detect COVID-19 patients based on chest X-ray images through CNN along with symptom analysis through a mathematical model analysis. Table A1 shows different kinds of optimization algorithms and their working process. Table A1. Different kinds of optimization algorithms and their working process.

First-Order Optimization
These algorithms minimize or maximize a loss function E(x) by using its gradient values. Gradient descent is the most widely used first-order optimization algorithm. From the first-order derivative, it can determine whether the function is increasing or decreasing at a particular point. It gives us a tangential line to a point on its error surface.

Second-Order Optimization
The second-order derivative, also known as the Hessian, minimizes or maximizes the Loss function. It uses the second-order partial derivatives matrix. The second order is not used much because it is costly to compute. The second-order derivative represents the function's curvature by determining whether the first derivative is increasing or decreasing. The second-order derivative provides a quadratic surface. This quadratic surface touches the curvature of the error surface.

Stochastic gradient descent
Stochastic gradient descent conducts parameter updating for each training example. This technique is usually faster. Stochastic gradient descent performs by updating the parameters one at a time.
where x (i) ; y (i) are the training examples.

Adagrad Optimizer
Approach of the AdaGrad optimizer is to use a different learning rate for each and every parameter θ at a time step based on the previous gradients that were calculated for that parameter. "It modifies the approach of general learning rate η at each time step t for every parameter θ based on the previous gradients that i have been computed for θ i " [39].
. g t,i .

AdaDelta
AdaDelta tends to eliminate the decaying learning rate problem of AdaGrad. Basically, it is an extension of AdaGrad. "Adadelta limits the window of accumulated past gradients to some fixed size w, Instead of accumulating all previous squared gradients" [39]. E g 2 t = γ.E g 2 t−1 + (1 − γ).g 2 t , set γ to a similar value as the momentum term, around 0.9. ∆θ t = −η · g t,i .

Adam
Adaptive Moment Estimation (Adam) is another technique that computes adaptive learning rates for each parameter. Like AdaDelta technique, in addition to storing the exponentially decay normal of previous squared Gradients, Adam likewise keeps an exponentially decaying normal of previous gradients M t . m t = m t These are the formulas for the first moment (mean) and the second moment (the variance) of the gradients. The final formula for the parameter update isθ t+1 = θ t − η √v t + +m t