Heart Sounds Classification for a Medical Diagnostic Assistance

In order to develop the assessment of phonocardiogram “PCG” signal for discrimination between two of people classes – individuals with heart disease and healthy onewe have adopted the database provided by "The PhysioNet/Computing in Cardilogy Challenge 2016", which contains records of heart sounds 'PCG '. This database is chosen in order to compare and validate our results with those already published. We subsequently extracted 20 features from each provided record. For classification, we used the Generalized Linear Model (GLM), and the Support Vector Machines (SVMs) with its different types of kernels (i.e.; Linear, polynomial and MLP). The best classification accuracy obtained was 88.25%, using the SVM classifier with an MLP kernel. Keywords—Heart disease, PCG, supervised learning classifier, GLM, SVM, PhysioNet/CinC Challenge 2016.


Introduction
Heart disease is the leading cause of death in the world. A published study says, these diseases represent a third of all deaths in 2015, with nearly 18 million deaths from cardiovascular disease in the world [1]. Statistics show that the mortality rate caused by cardiovascular disease is growing continuously, and there were nearly 13 million deaths from cardiovascular disease in 1990, to 17,92 million in 2015.
These diseases are a set of disorders affecting the heart and blood vessels which includes coronary heart disease, cerebro-vascular, rheumatic heart disease and other affections. People exposed to a high risk of cardiovascular disease are those have one or more risk factors, such as hypertension, diabetes, hyperlipidemia or illness already installed. An early detection of signs of cardiac abnormality represents an interesting initiative to take care of the patient [2].
During its work, the human heart emits sounds and vibrations that reflect its operating state, from which the auscultation comes as an important diagnostic tool since the dawn of time [3] [4]. The use of auscultation techniques invented by Laennec for analysis of heart sounds still insufficient, because the human ear isn't sensitive enough to fast signals with a low power. However, the skills that will allow the doctor to differentiate between a pathological heart and a normal heart from heart sounds, take a long time to be acquired, and leave a significant margin of error more or less important according to the subjectivity of the analyst [5] [6].
Then, in order to make a quick, accurate and non-invasive diagnosis of heart, we have suggested an automatic analysis of heart sounds signals.
The phonocardiograms (PCGs) are a temporal signal produced by the mechanical activity of the heart. The signal consists of four components which are respectively (S1, S2, S3 and S4) as shown on Figure 1 [8]. The PCG signal comes in the form of periodic cycle, called cardiac cycle split into two parts, the first part represents the systolic phase, which reflects the contraction of the heart and lasts about 0,27 seconds, followed by a diastolic phase representing the dilatation of the heart and its release taking about 0,49 seconds. The two phases alternate in order to build the cardiac cycle.
So, the PCG signal is very useful to inform us about the state of the heart, and we can conclude on its normal or sick state depending on the nature of signal, as shown in Figure 2 [9].
The wealth of the PCG signal in information pushed researchers to focus on the ability to differentiate between healthy people and people with heart disease. Many research works based on PCG signal processing and analysis have been published to improve the diagnosis of heart disease [10]. However, the detection accuracy obtained in these works remains ameliorative purpose.

Fig. 2. PCG Signal Analysis
In the present work, we propose a classification method of PCGs signals, based on an algorithm which contain a preprocessing phase, a segmentation phase and a classification phase using the SVM classifier (Support Vector Machine) and the GLM classifier (Generalized Linear Model). To improve the accuracy of the SVM classifier, we trained the classifier using the LS (Least square) method with the MLP (Multilayer Perceptron) kernel function.
The achieved results may compete with those of the finalists who participated in the PhysioNet/CinC Challenge 2016 concerning the Classification of Normal / Abnormal Heart Sound Recordings, and also with other works that was published recently using the PhysioNet/CinC Challenge 2016 database.

Related Works
The literature review allowed us to find a lot of research that have been published on the classification of the PCG signals. But the methods, and classification algorithms are applied on different databases, which makes the results relative and less comparable.
Then to be able to compare results of published works, classification methods must be applied on the same databases, training, validation or test. For these purposes, many challenges have been launched, among them the PASCAL challenge launched in 2011 with two parts, one destined to the segmentation of the PCGs signals and the other part dedicated to the classification. There is also the PhysioNet /CinC Challenge 2016 dedicated to the classification of heart sounds.
In [11], Potes et al participate in the PhysioNet / CinC Challenge 2016, developing an algorithm to classify the heart sounds into normal and abnormal. To do this, they extracted 128 time-frequency features from the PCG signal before attacking the Adaboost classifier. They also tried the conventional networks of neurons classifier "CNN". Otherwise, the final result, which put them at the top of the ranking of the challenge, is 86,02% of accuracy, 94.24% of sensitivity, and 77.81% of specificity, acquired by the fusion of the two classifiers, Adaboost and CNN.
On his part, Zabihi et al. [12] tried to take 18 features from 40 extracted from the PCG signal, and he proceeded to the classification using the artificial neural network classifier (ANN), without segmentation. This method allowed to complete the challenge in second position after Potes et al. by scoring 85.90% of accuracy, 86.91% of sensitivity, and 84.90% of specificity.
Bobillo's work [13] consist to a decomposition of the tensor, and reduction of its relative size. Then, he proceeds to the selection of features and the accumulation of data, using the MFCC (Mel-Frequency Cepstral Coefficients) and the 6th decomposition of Symlets from wavelets family, with 8th order. After having extracted the MFCC coefficients, Bobillo has used the KNN classifier to differentiate between normal/abnormal heart sounds, and the final result submit to the challenge comes by 84.54% of accuracy, 86.39% of sensitivity, and 82.69% of specificity.
The works presented in [11] [12] [13], have participated in the PhysioNet /CinC Challenge 2016, and the results achieved were based on the training and validation databases provided by the committee of the challenge. Except that, the final results published by the finalists are based on a secret test database to do a blind test, this test database is not provided to the public. So, to validate our results, we tried to compare it with other recently published works based only on the training and validation datasets of PhysioNet /CinC Challenge 2016.
We have identified Whitaker 's method [14], which consists on using sparse coding as a feature extraction tool to classify PCG signals. In this method, the preprocessed data had split into a dictionary matrix and a sparse coefficient matrix. The dictionary matrix represents the statistically significant features of the PCG, and the sparse coefficient matrix is a mapping that represents the entities used by each pretreated segment of the PCG records. Then, he used a matrix norm in the updating dictionary step of the sparse coding, in order to encourage the dictionary to learn discriminating features of abnormal heart records. afterwards, he combined the features of sparse coding with those of the time domain at the final stage, to be able to classify the PCG signals using the SVM classifier. It resulted 89.26% of accuracy, 90.07% of sensitivity, and 88.45% of specificity.
The work of Tang et al. [15] suggested using the multi-domain features and the SVM classifier. So, he tried to extract 515 features from nine feature domains (time interval, frequency spectrum of states, state amplitude, energy, frequency spectrum of records, cepstrum, cyclostationarity, high-order statistics, and entropy). Subsequently, he performed a correlation analysis that allowed him to identify that "frequency spectrum of state", "energy" and "entropy" are the most contributing domains in the extracted features. Finally, he proceeds to a classification using the SVM classifier, with only 400 features from 515 extracted, which gave him 88% of accuracy, 88% of sensitivity, and 87% of specificity.
Another work presented by Langley et al. [16], in which Langley tried to classify PCG signals without segmentation. Firstly, the 5 second segment at the start of each recording was analyzed, then by application of the Fast Fourier Transform "FFT", he determined the normalized spectral amplitude and he extracted wavelet entropy by analysis of wavelet.
And as a second phase, for each of the two previously extracted features, he applied a simple classifier based on a unique feature threshold. The thresholds have determined for optimal classification accuracy. The same steps have taken, but this time using segments without noise, and the extracted features (spectral amplitude and wavelet entropy) have combined in a classification tree. then, this method of classification without segmentation gave as result 79% of accuracy, 77% of sensitivity, and 80% of specificity.
Other works have been developed, based on the segmentation of PCG signals using different methods of envelope extraction, such as Shannon energy [17], Shannon entropy [18], Hilbert-Huang transform [19], and the autocorrelation [20], there are other approaches based on the wavelet transform to add the frequency features of S1 and S2 [21]. After, they proceed to extract the temporal, frequency and timefrequency features from the PCG signals, in order to classify heart sound records into normal/abnormal by using one of the classifiers most recognized (SVM, KNN, ANN, etc,).

Used Database
The PhysioNet website [22] provides an open database of PCG signal records, which has been well described in [23]. This database consists of six folders that together include 3 240 recordings of heart sounds "PCG" from various sources. Each record was classified as "normal" or "abnormal" (usually diagnosed with coronary heart disease or heart valve defects), and was individually marked as having a "good" or "poor" signal quality.
Heart sound recordings were obtained from several contributors around the world, collected in a clinical or non-clinical environment, in both of healthy subjects and pathological. The training dataset of this challenge includes five folders (named from A to E), containing 3126 "PCG" record, ranging from 5 seconds to 120 seconds [19].
PCG records were collected at four different locations on the body, the aortic (AR), the pulmonary (PR), the tricuspid (TR) and mitral area (MR) (fig.3). In both training and validation databases, recordings of heart sounds were divided into two types: the normal and abnormal heart sounds. The normal records came from healthy subjects and abnormal from patients diagnosed with cardiac pathology.
Healthy subjects and pathological patients include children and adults. Each subject/patient may have contributed one to six heart sound recordings. All records have been sampled at 2000 Hz and were provided to the ".wav" extension. http://www.i-joe.org

Methodology
The work we present is based on the sample code provided by the PhysioNet/CinC challenge 2016, which we have modified to achieve satisfactory results.
Our approach consists to a preprocessing of the PCG signals, followed by the segmentation that will allow us to detect the S1 and S2 components, and a features extraction from training datasets. The extracted features will be useful in the process of classifier training. Once, the classification model is ready, we will proceed to validate our methodology by classifying the validation datasets.
The validation datasets allow us to validate our algorithms, by calculating the sensitivity, the specificity and accuracy. The fig.4 shows the block diagram of our approach.

Preprocessing phase
The preprocessing phase consists to resampling the PCG signal to 1000 Hz, followed by 5th order, BUTTERWORTH lowpass filter, and whose cutoff frequency is 400 Hz. Then, we apply another 5th order, BUTTERWORTH high-pass filter, with 25 Hz of cutoff frequency, since the useful bandwidth of our PCG signal is between [25….400Hz].

Segmentation phase
The segmentation phase relies on the function "runSpringerSegmentationAlgorithm.m" [24], which essentially uses two sub-functions, the "getSpringerPCGFeatures.m" and the "getHeartRateSchmidt.m" [24]. These functions were previously developed by D.Springer et al.. They allowed us to segment the PCG signal.
For the segmentation phase, in first time we proceeded to extract homomorphic envelope and the Hilbert envelope of the signal PCG, and its power spectral density "PSD". By exploiting these features and using a predefined function, we could detect the peaks of the PCG signal (S1 and S2). Then, in order to locate the S1 and S2 components, we tried to adjust the minimum values of the amplitude in the peak detection, and also the distance between two successive peaks.
The distinction between S1 and S2 is done based on that the diastolic period is higher than the systolic period. Fig.5 shows the result of the segmentation phase.

Features extraction
The main idea of features extraction is to get 20 characteristics from our PCG signal, based on results of the segmentation phase and nature of the PCG record.
These features are as follow: mean value of S1 intervals sd_IntS1 SD value of S1 intervals mean_IntS2 mean value of S2 intervals sd_IntS2 SD value of S2 intervals mean_IntSys mean value of systole intervals sd_IntSys SD value of systole intervals mean_IntDia mean value of diastole intervals sd_IntDia SD value of diastole intervals m_Ratio_SysRR mean value of the interval ratios between systole and RR in each heart beat sd_Ratio_SysRR SD value of the interval ratios between systole and RR in each heart beat m_Ratio_DiaRR mean value of the interval ratios between diastole and RR in each heart beat sd_Ratio_DiaRR SD value of the interval ratios between diastole and RR in each heart beat m_Ratio_SysDia mean value of the interval ratios between systole and diastole in each heart beat sd_Ratio_SysDia SD value of the interval ratios between systole and diastole in each heart beat m_Amp_SysS1 mean value of the mean absolute amplitude ratios between systole period and S1 period in each heart beat sd_Amp_SysS1 SD value of the mean absolute amplitude ratios between systole period and S1 period in each heart beat m_Amp_DiaS2 mean value of the mean absolute amplitude ratios between diastole period and S2 period in each heart beat sd_Amp_DiaS2 SD value of the mean absolute amplitude ratios between diastole period and S2 period in each heart beat

Training & classification phase
After extraction of the 20 features, we train first the General Linear Model (GLM) classifier via the training database by taking 100% data for the training, and then we will validate on 10% records randomly selected from the training database.
The second classification we did, relies on the Support Vector Machine (SVM) classifier. In first time, we tried to train and validate this type pf classifier with a same method used previously with GLM classifier. In second time, we proceed to redo a same method to train and validate the SVM classifier but with different values of the Multi-Layer Perceptron (MLP) parameters.
To improve the accuracy of the SVM classifier, we tried to train it using a function of the MLP (Multi-Layer Perceptron) kernel, which is also known as sigmoidal kernel [14] with a curve of sigmoidal kernel function, as shown in figure 6. The weight "v" and polarization "c" are the parameters of setting Multi-Layer Perceptron (MLP). In MATLAB, the parameters are expressed as the P1 for the slope (weight) and P2 for the constant interception or bias. It is stated that P1 > 0 and P2 < 0. By default, the P1 and P2 values are fixed to 1 and -1, respectively.
A basic neuron with input "n0" is shown in the equation below. The entry (x) is weighted with a relevant w. The totality of the weighted entry (v) and the bias (b) inputs, shows part of the output of the activation function v(t). In addition, the positive activation is produced when the weighted reception activity is greater than the negative bias weight. The mathematical equation is defined as follow: Then, the neuron network applied as SVM kernel, can be presented in the form shown in the following figure: We should note that the process of training the hidden layer is done in two phases. The first one, in which inputs are assigned to the network at the first layer (input layer) and transmitted to the output through the hidden layer. Then, it will make the network output. The network error is calculated in the second phase, based on the predicted difference output and the actual output.
Returning to the equation of the MLP kernel function, and trying to appear the P1 and P2 parameters, the equation can be written as follow: ℎ : 1 > 0 2 < 0 The parameters (P1 and P2) are given by default interval of values [1 -1], which means that all the input values will be limited by [P1 P2], in other words all the values outside of the fixed interval, will be brought back inside of this margin.
By training our classifier to get an SVM model able to better classify our PCG signals, we started with the default (P1 and P2) parameters [1 -1], and retrying the classification several times by changing the limits of our margin, the best result of classification was scored for  parameters values.
We also want to specify, that the chosen method for the training phase of our SVM classifier is the least squares "LS" method. We did this choice following a huge number of training and classification tries, with different possible methods, and the best scored result was for a (P1 and P2) parameters previously fixed on , and for the LS method.

Evaluation
In order to evaluate our classification algorithm, we proceed to extract the specificity, the sensitivity and the accuracy. The found results are arranged following the table: Then, for each of the categories we associate a weight, which presented as follow: The sensitivity "Se" and the specificity "Sp" were calculated as:  We also tried another validation method, by training the classifier once one entire training database excluding the "e" folder, and a second time by training the classifier only on the "e" folder from training database. The table 4 shows the achieved result.

SVM classifier
Firstly, we tried the SVM classifier in same way as the GLM classifier previously presented, but with parameters default MLP [1 -1], after we tried the same classification by modifying these MLP parameters each time until we concluded that the [5 -5] are the best parameters to be adopted. The results are presented on the table 5.

Results comparison
To compare our results, we have tried to find a recently published works using only the training database on phase training and the validation dataset to validate their published results. Then, we have calculated our achieved accuracy, sensibility and specificity. The table 6 bellow shows the result of comparison. Referring to the results, we can conclude that: • The SVM classifier is better than GLM classifier.
• The modification of the P1 and P2 values of SVM classifier, allowed us to get a competitive result as shown previously in table 5. • The 20 features extracted from our PCG signal are sufficient to classify.
• The accuracy achieved in this work remains to improve.
Subsequently, we proceeded to a set of classification tries, by changing the size of data training and validation data to evaluate the performance of our classification algorithm. The table 7 present the whole results of these tries:

Conclusion
In this article, we have tried to extract 20 different significant features, after the segmenting phase of our PCG signal. Then, we used the GLM classifier, and also the SVM classifier to discriminate normal/abnormal PCG records from our validation database.
The results achieved using SVM classifier with MLP kernel are far better than results found with GLM classifier, and we report this to a features nature cause are not linear.
And to increase accuracy of the SVM classifier, we chosen to modify the parameters ([P1 P2]) of the MLP kernel, this modification allows us to modify the distance between plans of data selected by the phase of SVM training.
Indeed, the results achieved with new parameters [P1 P2] show that the accuracy is about 88,25%, instead of 83,6% found with parameters set as default. We can conclude that the new result can compete with the best methods of classification previously published, and can make discrimination between patient and healthy people sure and easy.