{'fraction_non_alphanumeric': 0.034601043997017154, 'fraction_numerical': 0.017822520507084265, 'mean_word_length': 4.820746527777778, '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}}
Gingivitis Classification via Wavelet Entropy and Support Vector Machine

Gingivitis is usually detected by a series of oral examinations. In this process, the dental record plays a very important role. However, it often takes a lot of physical and mental effort to accurately detect gingivitis in a large number of dental records. Therefore, it is of great significance to study the classification technology of gingivitis. In this study, a new gingivitis classification method based on wavelet entropy and support vector machine is proposed to help diagnose gingivitis. The feature of the image is extracted by wavelet entropy, and then the image is classified by support vector machine. The experimental results show that the average sensitivity, specificity, precision and accuracy of this method are 75.17%, 75.29%, 75.35% and 75.24% respectively, which are superior to the other three methods This method is proved to be effective in the classification of gingivitis.


Introduction
Teeth are one of the most important parts of human mouth. There are many diseases of teeth. Gingivitis is a common disease of teeth. Gingivitis mainly refers to the acute or chronic inflammation on the gum. The common symptoms of gingivitis mainly include swelling, bleeding and pain. Some patients may also have local itching and bad breath. Plaque accumulation, lack of nutrients or improper brushing may cause gingivitis.
In recent years, many scholars have carried out research on gingivitis and achieved many new results. Li (2019) [1] identified gingivitis through the method based on gray level co-occurrence matrix (GLCM) and extremum learning machine (ELM). In the study, this method was used to identify 52 teeth images, and different information about teeth was obtained through segmentation and classification from teeth images. It is found that this method is superior to other techniques in average sensitivity, specificity, precision and accuracy. Li (2019) [1] studied a method to identify gingivitis based on contrast-limited adaptive histogram equalization (CLAHE), gray level cooccurrence matrix (GLCM) and extremum learning machine (ELM). By comparing 58 pictures of gingivitis with 35 pictures of healthy teeth, we found that compared with the most advanced method, this method has higher classification accuracy and more sensitive results. Supranoto, Slot (2015) [2] studied the effect of chlorhexidine denifrice or gel versus chlorhexidine moushwash on gingivitis by retrieving databases such as PudMed-MEDLINE. Through screening 2256 samples, 5 publications meeting the standards were obtained. The research found that: by using chlorhexidine denifrice or gel versus chlorhexidine moushwash, we can effectively inhibit gingivitis. A randomized clinical trial was conducted by Sangeetha (2017) [3] to investigate the effect of triclosan containing tooth paste and conventional fluoride tooth paste on gingivitis. In the study, 56 children were randomly divided into two groups, experimental group used the triclosan containing tooth paste and control group used conventional fluoride tooth paste. The results showed that the experimental group was better than the control group in reducing the incidence of gingivitis. Triclosan containing tooth paste can inhibit gingivitis more effectively. Feng, Zhang (2015) [4] used wavelet energy (WavEnr) to identify brain images. Brown (2018) [5] used extreme learning machine (ELM) to identify gingivitis lesions of teeth images.
Through the above research results, we can find that the research of gingivitis mainly includes exploring the recognition methods of gingivitis, studying the methods of inhibiting gingivitis.
The main contribution of this study is to combine wavelet entropy (WE) and support vector machine (SVM) to propose a new method for gingivitis classification. wavelet entropy (WE) can not only get the image features, but also reduce the dimension of the features. As a powerful classifier, support vector machine (SVM) can achieve the image classification. We have achieved good results for combining WE with SVM.
The other parts of this paper are as follows: the second section describes the dataset, the third section briefly introduces the research methods, the fourth section is the experimental results and discussion, the fifth section is the conclusion of this study.

Dataset
In this study, we selected 5 patients with gingivitis from Nanjing Stomatological hospital to observe their gingivitis [1]. In this study, two digital single lens reflex (DSLR), i.e. A and B, were used to randomly select different teeth of each patient for image collection. A total of 170 teeth pictures were obtained, including 85 gingivitis pictures and 85 healthy teeth pictures. In the image, we mark three regions: near, middle and far. The field of view is 51-200 mm in diameter, and the voxel resolution is 0.1-0.39 mm.
In the study, we will manually adjust the length and width of the area of interest to make its appearance similar to the simulated image, in which we can clearly see the tooth area. The average length of the 12 bit image is 456732 and the average width is 567833. Figure 1 shows two sample images in the dataset. Figure 1(a) shows a gingivitis image, and Fig. 1(b) shows a healthy teeth image.

Wavelet
Wavelet transform [6][7][8][9][10] is an improved frequency transform method based on Fourier Transform (FFT). Wavelet transform overcomes the defect that the unstable signal can't be processed in Fourier transform [11][12][13][14][15]. The infinite trigonometric function base is replaced by the finite attenuation wavelet base, which can not only capture the frequency of the unstable signal, but also locate the time.
The image is a two-dimensional matrix. We get four components (LL1, LH1, HL1, HH1) after wavelet transform. One component (LL1) represents the blurred image, and the other three components (LH1, HL1, HH1) represent the detailed image. Then we get another four components (LL2, LH2, HL2, HH2) of LL1 by double wavelet transform (2D-DWT). After the double wavelet transform (2D-DWT), we get an entropy value. The formula of wavelet is: Wavelet transform can effectively decompose images of different pixels and retain image information. But after decomposition, it contains too many image features, which not only takes up a lot of storage space, but also increases the calculation time [16][17][18][19][20]. So we need to reduce the dimension of the feature by introducing entropy.

Entropy
Entropy is the uncertainty degree of information that Shannon quoted from thermodynamics. Entropy is a measure of disorder, which is used to represent the average value of information of probability distribution [21][22][23][24][25]. Suppose a random variable X, the value of X in dataset D is ð Þ is the probability function, then the entropy is: Where E is the expected value. If D is an infinite set, then the entropy of the random variable X is: As shown in Fig. 2, after wavelet transform, the image is decomposed into seven components, and then the entropy of these seven components is calculated to get the eigenvector. Through the method of wavelet entropy, we can not only get the image features, but also effectively reduce the dimension of image features.

Support Vector Machine
Like classified learning, the most basic idea of image classification is to find a partition hyperplane to separate different images. Support Vector Machine (SVM) is the latest classification method based on machine learning theory [26][27][28][29]. It is a twoclassification model to find a hyperplane for image segmentation. The function of SVM is to help to build a hyperplane with a maximum interval. In support vector machine, a training sample set D is given.
Based on the sample set D, a partition hyperplane is found to separate the categories of different samples. The linear equation of partition hyperplane is expressed as: Where w is the normal vector, which determines the direction of the hyperplane, and b is the displacement, which determines the distance between the hyperplane and the origin. Supposing the hyperplane can classify the training samples correctly, for the training samples x i ; y i ð Þ, the following formula is satisfied: The formula is equivalent to: The sample points which are closest to the hyperplane and meet the fomula of ð Þ!þ1 are support vector. From the above formula, we can get the interval: The idea of SVM is to maximize the interval, so the formula can be represented as: From the above formula, we can know that maximizing 2 W k k is equivalent to minimizing W k k, so the basic type of SVM can be expressed as: The Lagrange multiplier method is used to solve the basic dual problem: After deriving the w and b of the above formula, make equal to 0, and bring them into the Lagrange multiplier method, we can get: After solving the above problems, we can get the optimal classification function as follows: This WE and SVM combination belongs to traditional feature extraction + classifier combination. We do not use deep learning methods [30][31][32][33][34][35][36][37][38] because the small-size dataset.

10-fold cross validation is a commonly used data accuracy test method in statistics.
This method is to divide the data set into 10 groups as shown in Fig. 3, one group as the test set in turn, and the other nine groups as the training set for experiments. Each experiment will produce a result, and the average value of the 10 results is the accuracy value of the algorithm. In this study, 10-fold cross validation is used to verify the accuracy of image classification.
This 10-fold cross validation will be run 10 times, and we use those measures to performance the performance of proposed algorithm. There are six evaluation indexes in classification: sensitivity, specificity, accuracy, accuracy, F1 and MCC. Sensitivity is the proportion that the test is correctly recognized as positive; specificity is the proportion that the test is correctly recognized as negative. Precision is the ratio of the number of positive samples correctly predicted to the number of positive samples predicted. Accuracy represents the ratio of the number of correctly predicted samples to the total number of predicted samples. F1 is the harmonic average of precision and recall. MCC is essentially the phase between the observed value and the predicted value Relation number.

Statistical Results
In the first experiment, we set the decomposition level of WE as three, and the results are shown in Table 1. From Table 1, we can see that WE-SVM method has achieved good results as a whole. At the 6th run, the sensitivity, accuracy, F1 and MCC of the samples were all good, and the values were the highest; at the 8th run, the specificity and precision of the samples reached a peak with the values of 80.01% and 77.90% respectively, but the values of sensitivity, accuracy, F1 and MCC were relatively bad.

Optimal Decomposition
In this experiment, we compared the best decomposition levels. We suppose the decomposition level L vary from 1 to 4, and the corresponding results are shown below in Table 2.
In Table 2, we can see that when the value of L is 3, the values of sensitivity, specificity, precision, accuracy, F1 and MCC are the highest, so the effect of image at the third level is the best. we regard the third level as the best level of image decomposition.

Comparison with Other Classifiers
Decision tree (DT) and naive Bayesian classifier (NBC) are two classical classifiers. We compared using SVM with DT and NBC, at the condition of using 3-level decomposition. The results of DT and NBC are listed in Table 3. The different classifier comparisons are shown in Table 4. From Table 3, it can be seen that DT and NBC are quite different in all aspects, of which the difference between the two methods in sensitivity and specificity is the most obvious. The highest value of DT is 78.82% and 76.47% respectively, NBC is 72.92% and 72.98%, DT is obviously superior to NBC. In Table 4, when DT, NBC and SVM are compared, SVM is superior to the other two methods in all aspects and the difference is large, which shows that SVM has obvious advantages as a classifier. So the SVM method used in this study is effective.

Comparison to State-of-the-Art Approaches
We compared our WE-SVM method with three state-of-the-art approaches: WavEnr [4], ELM [5], GLCM [1]. The results are shown in Table 5. As shown in Table 5, when compared with the most advanced methods, we can find that the value of WE-SVM is higher than that of other methods in terms of sensitivity, specificity, precision and accuracy, which proves the effectiveness of WE-SVM and shows that WE-SVM is the optimal algorithm.

Conclusions
In this paper, a method of gingivitis classification based on wavelet entropy and support vector machine is proposed. By using this method, we can accurately classify the teeth pictures. Through the analysis of experimental data, WE-SVM can find that the sensitivity, specificity, accuracy and accuracy of the method are higher than 75%, which is more accurate and sensitive than the three most advanced methods. However, due to the small number of samples in the database, it may cause over fitting phenomenon, which will be improved and avoided in future research, so that this research will be more helpful for dentists to carry out gingivitis testing.