Multiscale tsallis entropy for pulmonary crackle detection

Pulmonary crackle is one of the adventitious lung sounds caused by lung diseases such as bronchopneumonia or bronchiectasis [1]. It is a lung sound with short, non-musical and discontinuous duration with the frequency in the range of 150 2000 Hz [2]. This lung sound can be detected by doctors using a stethoscope through auscultation technique. The accuracy of this technique is often uncertain for being highly dependent upon the physician expertise, affected by noise, and subjective [3]. Various methods of digital signal processing have been developed to overcome the limitation of the auscultation technique, particularly to recognize the pulmonary crackle sound automatically.


Introduction
Pulmonary crackle is one of the adventitious lung sounds caused by lung diseases such as bronchopneumonia or bronchiectasis [1].It is a lung sound with short, non-musical and discontinuous duration with the frequency in the range of 150 -2000 Hz [2].This lung sound can be detected by doctors using a stethoscope through auscultation technique.The accuracy of this technique is often uncertain for being highly dependent upon the physician expertise, affected by noise, and subjective [3].Various methods of digital signal processing have been developed to overcome the limitation of the auscultation technique, particularly to recognize the pulmonary crackle sound automatically.Some researchers used a number of different methods for the analysis of pulmonary crackles.Yeginer and Kahya used a wavelet network for pulmonary crackle feature extraction [4].This method was reported to be more resistant to noise in comparison to other traditional methods.Meanwhile, in [2], pulmonary crackle analysis was performed using time-frequency and time-scale methods.Windowed Fourier Transforms (WFT) with various types of windows has been used in the time-frequency analysis; while wavelet transforms with various mother wavelets was used in time-scale analysis.Classification using a support vector machine overall resulted in the accuracy of 81%.A more extensive discussion in the use of the wavelet for pulmonary crackle analysis was presented in [5].The sub-bands used for pulmonary crackle analysis included D3, D4, and D5.
Commonly, the signal complexity measurement is used for pulmonary sound analysis as it represents the sound features [6].The measurement methods of the signal complexity for examples include fractal [7], entropy [8], and chaos analysis [9].Pulmonary sounds are believed to have multiscale properties as in the other biological signals [10].Therefore, the lung sound analysis using multiscale signal complexity approach is believed to be able to increase the accuracy of the classification.
One of the metrics for measuring signal complexity is TE [11] often referred to as non-additive entropy and used in various biological signal studies.TE application includes electroencephalogram (EEG) signal analysis [12], electrocardiogram signals (ECG) analysis in coronary artery disease [13], and lung sounds in chronic obstructive pulmonary disease (COPD) [14].TE is used in a lung sound analysis because lung sound is a non-additive signal.Pulmonary crackle sound is not a crackle sound added to a normal lung sound but different from lung sound that represents a pathological condition.In these studies, TE is usually used with order = 2. Therefore, other parameters have been needed as a specific feature for the analyzed biological signal.A different approach was performed in [15] using TE with the order of 1-10 as the features of the lung sound.The results showed that TE with non-extensivity parameter, q = 2, 3, and 4 resulted in an accuracy of 95.35% for pulmonary crackle classification.
In this study, multiscale analysis and TE with various non-extensivity parameter were combined.Coarse-grained procedure process as in [10] was applied to the signal to form a new signal sequence with a different scale.Furthermore, TE measurements with certain non-extensivity parameter were used to generate the signal features.The results were the scale and the best non-extensivity parameter that produced the highest accuracy.Multilayer perceptron (MLP) and three-fold cross-validation (3fold-CV) were used in the previous study [15] to make the results from this study comparable to the previous ones.It was found that the proposed method resulted in higher accuracy compared to the multi-order TE.

Method
Fig. 1 shows the process used in this study.It began through the normalization process to the lung sound to equalize the data.Following this, the multiscale process using coarse-grained procedure was conducted.It was then continued with the TE calculation of each scaled signal.The TE value would be the signal features and classified using multilayer perceptron (MLP).The detail of each process is described in the next subsection.

Lung Sound Data
Pulmonary sound data in this study consisted of normal lung sound and crackle sound.Data was taken from various sources on the internet and has been used in the previous study [15].The normal sound was recorded from a 26 years-old-man; while the pulmonary crackle sound was taken from patients with interstitial pulmonary fibrosis and patient with cystic fibrosis.There were 21 crackle sound data; whereas there were 22 normal lung sound data.The normal pulmonary sound is the sound of the lung in normal conditions which is nonmusical, soft and audible on inspiration and at the beginning of expiration.The disappearance of this sound indicates some problems in the lung sound generation process, such as airway constriction or obstruction [16].Crackle is an adventitious sound of the lung that is explosive, short, non-musical and discontinuous [17].The examples of diseases that produce crackles are congestive heart failure (CHF), pneumonia and chronic bronchitis [16].The examples of pulmonary sound signals are shown in Fig. 2.
The data of the lung sound with a length of one breathing cycle (one inspiration and one expiration) is in the form of file wave with a sampling frequency of 8000 Hz.Normalization was done to the data as in the Equation ( 1) and ( 2) [15].
Vol. 4, No. 3, November 2018, pp. 192-201 Rizal et.al (Multiscale tsallis entropy for pulmonary crackle detection) where x is the input signal, N is the number of the data sample, and y is the output signal result of the zero-mean process.After this process, amplitude normalization was applied using (2).
where x is the input signal, y is the output signal and then becomes the input of the coarsegrained procedure.

Coarse-Grained Procedure
Coarse-grained procedure forms a new signal with a different scale using a moving average process [10].This procedure can be expressed mathematically as in (3).where x(i) is an input signal; while yj (τ) is a signal from the coarse-grained procedure at the scale of τ.
The example of the signal from the coarse-grained procedure scale two is as in (4).
The scale of τ = 1 -20 was used in this study and then was reduced to observe the effect of the number of the scales on the accuracy.

Tsallis Entropy
Tsallis proposed TE in 1988 as the general form of Boltzmann-Gibbs Statistics [11].It is mathematically expressed as in the (5).
where Pi is a discrete probability, q is the extensivity parameter or order, and W is a microscopic configuration.
TE is also known as non-additive entropy: if there are two identical systems, then the total entropy from both systems is not equal to the sum of TE1 and TE2.It can be written mathematically as in (6).

𝑇𝐸(𝐴, 𝐵) = 𝑇𝐸(𝐴) + 𝑇𝐸(𝐵) + (1 − 𝑞)𝑇𝐸(𝐴)𝑇𝐸(𝐵)
  If the non-extensivity parameter order q = 1, the TE is a normal Shannon entropy.TE is used to determine the signal that quickly changes, and the dynamic system with the long-range interactions or that can be far from equilibrium [18].It is also used to extract the features of the crackle sound as explained in [15].

Multilayer Perceptron and N-fold Cross-Validation
Multilayer perceptron (MLP) is one of the classes from the neural network that is often used for classification.It consists of at least three layers: input, hidden, and output layers as shown in Fig. 3.The input layer has the same node numbers with the total features of the data, and the number of the nodes in the output layer is similar to the data class.On the other hand, a total node in the hidden layer is determined by trial and error [19].In this study, the output layer = 2 was used while the input one was adjusted with the total features to be used.In this research, we reduced the number of scales to observe the effect of the number of features on the accuracy.The number of nodes in the hidden layer was altered to obtain the highest accuracy.Fig. 3 simply illustrates the MLP configuration.
Since MLP is one of the models with supervised learning, N-fold cross-validation (N fold CV) was used to divide the training and the testing data.In the N fold CV, data was divided into N dataset in which one data set became the testing data, and N-1 dataset became the training data.This process was repeated until each data set had become the testing data.This method was beneficial to reduce the high variance in the clarification result due to the uneven data partition between testing and training data [19].In this paper, we used N = 3.Since the number of data was 22 for normal lung sound and 21 for crackle sound; thus, we would have 7-8 data for each dataset.

Results and Discussion
The results of the coarse-grained process procedure for crackle sound and normal lung sound are presented in Fig. 4 and Fig. 5 respectively.Here, the shape of the crackle sound did not significantly change, but the total sample data decreased to N/τ, where N was the total sample data at the beginning, and τ was a scale.This is related to the nature of the coarse-grained procedure that averages some τ for each scale.The signal at scale τ = 1 is the original signal.The higher scale τ will decrease the variance of the signal.Fig. 6 shows the result of the TE measurements with q = 2 and q=5 and scale of 1 -20.Both figures had a number of different patterns.If at q = 2, the TE values were separated on a scale of 1 to 10 and coincided on a scale of 10 to 20, then TE values at q =5 were almost separated for all scales.The TE values at q = 5 were lower than the TE values at q = 2 because of the dividing factor of q-1 in the equation (5).Moreover, since the p < 1, if the q value increased, then the p q value decreased.
The absolute TE values from crackle sound were lower than the absolute values of TE from the normal lung sound.This indicated that the signal complexity from the pulmonary crackle sound was lower than that of the normal lung sound.The larger the scale τ, the lower the absolute TE values would be.It was because the generated signal from the coarse-grained process procedure flattened so that the signal variance also decreased.At scale 1 where the measured TE signal was the original signal, the TE absolute value was the highest compared to the other TE absolute values from other scales.Table 1 lists the output of the Analysis of Variance (ANOVA) of the TE values from each order at the scale of 1 to 20.The larger F-value and smaller p-value indicated that the features between classes were more distinctive [12].Table 1 shows that all F-values > F-critical value the p-values < 0.05, indicating that the features from each class were statistically different.
Table 2 shows the accuracy of the classification using MLP and 3-fold CV.The TE achieved the highest accuracy value (97.67%) with q = 2 and a scale of 1 to 15.The scale reduction tended to increase the accuracy up to the scale of 1 to 10. Furthermore, scale reduction has reduced accuracy.The TE with the odd order (q = 3, 5, 7, and 9) had a similar accuracy at all scales.This finding was consistent with the previous study where the TE with odd order generated the same data characteristic [15].The odd non-extensivity parameter q had the better average accuracy but not at the highest.The TE with an odd order had accuracy up to 90.07% for an original signal while TE with even order had relatively low accuracy for their original signal.Fig. 7 indicates that the TE with q = 7 had more distinctive values between the normal and pulmonary crackle compared to the TE with q = 6 at scale τ = 1.The odd TE also had relatively less separated TE values compared to the even TE.
The multiscale process in this study provided complete information on pulmonary sound signals.The higher the scale, the lower the signal complexity of the lung sound would be.This also applies to the order of the TE, the higher the order, the less the signal complexity of the measured signal.A correct selection of the scale and order will then give the maximum results.A multiscale approach to lung sound analysis has been performed in several studies.In [20], they used multiscale entropy (MSE) for pulmonary sound analysis in an alveolitis patient.The sample entropy was measured on the coarse-grained procedure signal up to level 4. The paper did not measure the accuracy of classification but showed that MSE was more consistent as a feature compared to the feature from the other spectral methods [20].A multiscale Hjorth descriptor for lung sound analysis was used in another study [6].Signal complexity was measured using the Hjorth descriptor on a scale of 1-20 using the coarse-grained procedure.The best results were achieved at complexity on a scale of 1-5 with an accuracy of 95.06% for 81 data in 5 classes.This result was better compared to the measurement of Hjorth descriptor on a single scale [21].There is also a study that modified the texture analysis commonly used for image analysis with multiscale process [22].Modified grey level different matrix (GLDM) was used to extract the features of the respiratory sound in the multiscale scheme.Gradient entropy on a scale of 1-10 yielded the highest accuracy of 91.36% using the same approach as in [6].
The use of TE in the respiratory sound analysis is presented by Morillo et al. [14].TE was combined with Shannon entropy, Renyi entropy, and other ten features which resulted in 26 parameters that were used to analyze the breathing sounds.Using principal component analysis (PCA) for features reduction and support vector machine (SVM) as a classifier, the accuracy of 75.8% was reported.The research did not explain the role of TE because in the next process PCA was used to reduce the dimension of features.In [23] seven entropies were used as the features for the lung sound classification.Those entropies were Shannon entropy, spectral entropy, Tsallis entropy (TE), Renyi entropy, wavelet entropy, permutation entropy, sample entropy, and approximation entropy.TE produced the highest accuracy of 69.7% when used as a single feature for five classes of lung sound data.Meanwhile, a composite of seven entropies would increase the accuracy up to 92.93%.When we removed Shannon entropy as the feature, the accuracy increased at 94.85%.Coarse-grained procedures combined with the fractal dimension for classification of pulmonary sounds provided a quite high classification accuracy [24].Using Petrosian C and scale 1-5 the resulting accuracy was 98.99% with SVM as a classifier.A similar study was conducted to compare the accuracy of coarse-grained procedures combined with various entropy for pulmonary sound classification [25].Multiscale Tsallis entropy produces 91.92% accuracy for five data classes.In this study, the effect of order selection on TE was not analyzed.All research described above were used different lung sound dataset, so it could not compare directly.TE with different order q was used for pulmonary lung sound features extraction [15].The paper used the same data as in this study, and the highest accuracy was 95.35% for q = 2, 3, 4. Multiscale TE method produced better accuracy but used more features compared to multi-order TE.Multiscale analysis proofed to increase the classification accuracy.Table 3 displays a comparison between the proposed method and other multiscale methods and TE as the features in lung sound analysis.A comparison using the same dataset can be the next work in subsequent research.The research has some limitations such as the small number of samples and scale reduction done by trial and error.In the study, the data used had no noise.Some noise that may appear in lung sounds such as heart sounds, swallowing sounds and environmental sounds [26], [27].Reduction of noise in pulmonary sounds is a separate field in pulmonary sound research [28], [29], [30].Therefore, the effect of noise on the obtained TE cannot be observed.Since TE measured non-additive entropy, the addition of noise to the lung sound will change the TE value nonlinearly.This will affect the performance of TE for pulmonary sound analysis.Multiscale TE testing for more lung sound classes, a variety of noise additions is discussed in subsequent research.

Conclusion
This paper presents the multiscale measurements of Tsallis entropy in various non-extensivity orders for pulmonary crackle analysis.Multiscale analysis on lung sound accommodates the lungs' multiscale properties, while Tsallis entropy is used to reveal the lungs' signal complexity.In this paper, we used the coarse-grained procedure to decompose lung sound into several scales.Multiscale Tsallis entropy with order q = 2 in 15 scales yielded the highest accuracy of 97.67%.This result was found better than multiorder Tsallis entropy that only yielded an accuracy of 95.35%.However, the proposed method has a drawback, which is the use of more features compared to multi-order TE.The future study could combine the scale and order of TE to improve the obtained accuracy.A feature subset selection method can be used in this case.Moreover, TE measurements of other various classes of the lungs can be conducted to obtain more comprehensive abilities of TE for classification.

Table 1 .
F-value and P-value of Analysis of Variance (ANOVA)

Table 2 .
Accuracy (%) of pulmonary crackle classification using various scales and TE orders

Table 3 .
Comparison of Multiscale TE and other multiscale feature extraction and Tsallis entropy for lung sound classification