Improving Classification Accuracy of Heart Sound Signals Using Hierarchical Mlp Network

—Classification of heart sound signals to normal or their classes of disease are very important in screening and diagnosis system since various applications and devices that fulfilling this purpose are rapidly design and developed these days. This paper states and alternative method in improving classification accuracy of heart sound signals. Standard and improvised Multi-Layer Perceptron (MLP) network in hierarchical form were used to obtain the best classification results. Two data sets of normal and four abnormal heart sound signals from heart valve diseases were used to train and test the MLP networks. It is found that hierarchical MLP network could significantly increase the classification accuracy to 100% compared to standard MLP network with accuracy of 85.71% only.


INTRODUCTION
Heart auscultation and diagnosis are quite complicated, depending not only on the heart sound but also on other factors such as the acquisition method and patient condition [1].In the last two decades, many research activities were conducted concerning automated and semi-automated heart sound diagnosis.The researches were concentrated at three major tasks which are segmentation of the heart sound, feature extraction and classification of heart sound signals using artificial intelligence system.The classification algorithms were mainly based on Discriminant analysis [2], k-Nearest Neighbour [3], Bayesian networks [4], Neural Networks (including radial basis function, multiplayer perceptron, selforganizing map, probabilistic neural networks) [5][6][7] and rulebased methods [8].
Artificial Neural Network (ANN) is one of the popular method used in classifying the heart sound signal.Sinha et al. [9] and Ari et al. [10] have done several researches and proved that ANN can classify a few type of heart valve diseases with good accuracy.ANN is a mathematical model that is inspired by the biological neural networks in human brain.In general, neural networks provide good solutions to problems with the following features.
 The problem related to noisy data.ANN has been proved to be robust for noise data applications [5][6][7]11].
 A good and fast processing may be required instead the most perfect solution.
 There are no simple rules for solving the problem but only a set of sample solutions.The network can be `trained' on these so that it produces good responses to similar new cases.
Regardless the methods are, classification accuracy is the most important since poor performance given by the system or classifier to recognize the significant cardiac lesions might leads to adverse outcomes to the patient as well as unnecessary costs for inappropriate and even potentially hazardous laboratory test.Hence this study is done to provide an alternative method in improving classification accuracy of normal and abnormal heart sound signals from heart valve disease by using standard and improvised hierarchical Multi-Layer Perceptron (MLP) networks.Normal (N) and four abnormal heart sound signals of Mitral Regurgitation (MR), Mitral Stenosis (MS), Aortic Regurgitation (AR) and Aortic Stenosis (AS) from heart valve disease are used as the data in the classification process.Stenosis and Regurgitation problems are chosen in this study since they always affect the heart valves.There are cases where one or more valves affected by both problems.So there will be multiple types of heart valve disease that make the classification of the heart sound signal is very difficult [12].That is why this study is limited with two heart valves (Mitral and Aortic valves) which having regurgitation or stenosis problems.

II. HEART SOUND SIGNAL
The data used in this study is solely from heart sound signal, no ECG or other biomedical signals are involved.The heart sound signals are taken from three sources, which are heart sound manipulator software, recorded signals from Hospital Tuanku Fauziah (HTF) and signal that is available in the internet.The heart sound manipulator software was used to test the reliability of the method used in feature extraction.The recorded signals from HTF are not enough for the study since only 6 subjects with specific required diseases are obtained.Hence, the data that are available in the internet are collected to be used for the analysis in this study.Even so, the data collected from the internet are obtained only from trusted medical and electronic stethoscope websites.These data were verified first to ensure that no artificial signals involved.
For classification purpose, all heart sound signals from the three sources are divided into two data sets.The first data set are the simulated heart sound signals from the heart sound manipulator software.There are seven subjects (recording) taken and each subject contributes 30 samples after manual www.ijacsa.thesai.orgsegmentation process is done (two heart sound cycles of each sample).The second data set contains 39 samples and 646 samples.It is collected from the real recording heart sound signals from HTF and collected heart sounds signal from the trusted websites.Since the duration of each signals of the second data sets are different, it contributes different numbers of heart sound samples, which also manually segmented by two cycles of heart sound signal.The summary of subjects and samples taken from all sources is shown in Table I.Segmentation on heart sound signal needs to be done to obtained uniform samples to be used for the analysis.The reason is that the collected signal from three different sources varies in term of duration, number of cycles and so on.Segmentation is done based on cycles since other features such as time and frequency are not consistent.Two cycles of the recorded heart sound signal are taken as a sample.Two cycles are taken as a sample because the two-cycle-sample offered different feature of S1, S2, systolic and diastolic components for each cycle.This will make the analysis more accurate.

III. FEATURE EXTRACTION PROCESS
Frequency analysis method is applied in this study in order to obtain the frequency features of the heart sound samples.Cross-correlation function is used in understanding the strength of a linear relationship between two variables in this case normal and abnormal heart sound sample.Correlation analysis method is selected because it plays a major role in statistical signal processing.The cross-correlation function is used extensively in pattern recognition and signal detection [13].
In this study, cross-correlation was used to find the frequency (power spectrum) relation of a reference sample with a normal or abnormal heart sound sample.The reference sample is an average of 100 normal heart sound samples (also in power spectrum form).The power spectrum gives a plot of the portion of a signal's power (energy per unit time) falling within given frequency bins.The most common way of generating power spectrum is by using DFT function, but other techniques such as the Maximum Entropy Method can also be used (Weisstein & Eric, 2010).DFT is used in order to find the frequency components of a signal buried in a noisy time domain signal.
The procedure starts with converting the two-cycle-sample (time domain) into frequency domain using Discrete Fourier Transform (DFT).The equation to calculate the DFT is shown in (1) where x is the heart sound signal in time domain while N is the length of the x signal.Then power spectrum of the signal is determined using complex conjugate (conj) function as in (2), based on the DFT signal. ( (2) Knowing that the heart sound signals frequency components are at below 600 Hz [14,15], the first 600 components of the power spectrum are considered as the most important signals to be analyzed.The first 600 components are the energy of the first 600 Hz frequency components of the heart sound signals.The process of taking out the 600 significant values can be viewed as a filtering technique (in frequency domain) where undesired frequencies components can be simply cut-off.Power spectrum of the reference sample (P r ), also 600 values, is then cross-correlated with power spectrum of a test sample (P X ) using (3) where * denotes complex conjugation and k is a variable to complete the crosscorrelation [16].As for the reference sample, it is obtained by averaging 100 sets of normal heart sound samples.Fig. 1 shows the power spectrum plot of the reference heart sound sample.
(3) www.ijacsa.thesai.orgCross-correlation between these signals will give 1200 points of plot pattern which depends on the type of the signal (normal and abnormal).For a normal testing sample, the cross-correlation plot should be symmetrical or almost symmetrical since it is correlated with reference sample that is also normal heart sound sample.For abnormal sample cases, even there are times when the correlation plot has the symmetric pattern, but the position of the plot are different.The plot patterns (slopes, curves and peaks with their position) were used in this study as the features to classify the samples into their category of heart sound.Fig. 2 shows examples of cross-correlation plot pattern for each category of normal and abnormal heart sound.The 1200 points for a sample is too many to be processed and thus it is averaged to 50 points only.The points cannot be reduced less than 50 since it will significantly interrupt the plot pattern.This 50 points data (a heart sound sample for classification) will be used to train and test the MLP classifiers.Using an output neuron for a category will make the training process easier.This is because the network only has to produce output valued 1 to the corresponding neuron and 0 to the others.The second MLP network that was used to classify the five categories of heart sound signal is hierarchical MLP network.Two MLP networks are used to classify normal and abnormal heart sound signal as well as classify the abnormal signal.This method reduces the complexity of training process and could increase the classification accuracy of the system.Fig. 4 shows the network structures.The first network in this structure has two output neurons for normal and abnormal category of heart sound.Abnormal category is the combination of four abnormal signals, which are AR, AS, MR and MS.The second network is used to classify the four categories of heart sound signals if the first network has abnormal output.Both networks used the same 50 values of the cross-correlation plot as the input.As for the number of neurons in hidden layer, each network is tested with different hidden neurons from a single neuron to a maximum of 30 hidden neurons.30 hidden neurons were set to be a maximum considering the time consumed to complete the process is acceptable.The initial weights and biases were set using random function in MATLAB software.
Levenberg-Marquardt training (TRAINLM) algorithm was used for the training since it is the fastest convergent method available in the MATLAB Neural Network toolbox.Log-sigmoid transfer function (logsig) was the transfer function used in the network.The function logsig www.ijacsa.thesai.orggenerates outputs between 0 and 1 as the neuron's input goes from negative to positives infinity.

V.
RESULTS AND DISSCUSSION Accuracy of classification on both networks is discussed in this section.The classification accuracy is calculated based on different random values (the initial values for weights and biases) with 30 different number of hidden neurons (from 1 to 30) to find the best classification accuracy.The proposed classifier was validated using two different data sets of heart sound signals.The first set is a simulated heart sound data and the second set is a combination of heart sound data from real patients and internet as in Table 1.0 before.The samples of both data sets are approximately divided into 60% and 40% for neural network training and testing purposes respectively.For the second data set, subjects and its samples were also divided into the ratio of 60% and 40%, which means testing is done using different samples from completely different subjects.

A. Classification Accuracy of Standard MLP Network
Normal (N) and the other four categories of heart valve disease (AR, AS, MR, MS) sounds are classified using a standard MLP network.Training parameters for goal and gradient are set to 1×10 -24 and 0, respectively.Number of epochs is maximized until 1000.The training will stop if it achieved the target values for goal or gradient or else after the epoch reached 1000.Other training parameters were set to default values assigned by MATLAB.The classification accuracy is described based on 10 trials, which means 10 times of training testing using different random values, at 30 different hidden neurons.The 10 sets random values are set using seed 1 to 10 of the random generator provided by the neural network toolbox in MATLAB software.This random is used to set to give 10 different initial values for weight and biases in the neural network structure.The initial weight and bias values can affect the training and testing accuracy of the network.Therefore, the network is trained ten times to obtained the best trained network with the highest classification accuracy.
The best trained network for each number of hidden neuron (from 1 to 30) after 10 trials will be selected so that the results of training and testing accuracies, number of epochs as well as the MSE can be compared.The selection is made based on the performance of network training, training accuracy and finally testing accuracy.The number of input neurons is 50 while the number of output neurons is five for five categories of heart sound.The samples used for training and testing are shown in Table II.For the first data set, 100% classification accuracy was easily obtained at any different numbers of hidden neuron after trials or ten times of testing except for 1 and 2 hidden neurons networks.These results are shown in Table III.This table shows the average testing accuracy with the best trained network for each hidden neuron after ten times of training and testing.The highest average testing accuracy is 95.713% at 22 hidden neurons.This show that 22 hidden neurons is the best number of hidden neurons because it can correctly classify the heart sound signals even the initial values for weights and biases are different.
The classification accuracy using the same method for second data set is given in Table IV.Most of the networks with different number of hidden neurons show a good training accuracy which is over 96% accept for the first network of 1 hidden neuron.The best classification accuracy obtained is only 86.12% even after 10 trials at each hidden neuron were tested.The best accuracy obtained was at 15 hidden neurons with MSE 9.99x10 -25 and epoch of 164.However, the 15 hidden neurons network have too low average accuracy of 67.67% after 10 trials were made.So another network need to be chose.It is found that the network is best trained at 26 hidden neurons where the average accuracy after 10 trials is 80.08% and the testing accuracy is 85.71%.The average testing accuracy of 80.08% is selected because it is an acceptable value after 10 times of testing using 10 different initial weight and bias values.The classification accuracy of 85.71% at 26 hidden neurons is also not too different form the highest one (86.12%).The classification accuracy of second data set significantly dropped compared to the accuracy obtained by using the first data set.This is because samples from the second data set are from 39 subjects compared to the first data set, 7 subjects only.Hence the second method that uses Hierarchical MLP network is used to improve the classification accuracy of the second data set.www.ijacsa.thesai.orgFrom the results shown in Table 6, training accuracy of all selected networks at each number of hidden neurons are 100% where each network were trained and achieved the goa1 of 1x10 -24 with maximum epoch of 523.100% of testing accuracy of normal and abnormal classification was achieved at several numbers of hidden neurons.The other testing accuracies were exceeded 94% except for 1 hidden neuron network, 87.35%.This shows that the network have successfully learnt and classified the heart sound signals very well.The best average testing accuracy obtained is at 25 hidden neurons network with the accuracy of 94.654%.However, the best testing accuracy at this network is only 98.78%.100% of testing accuracy had become priority in selecting the best network only if the average accuracy is acceptable values, over 80%.Hence the best network is at 22 hidden neurons because it produced 100% accuracy for training and testing with an average accuracy of 83.184%.The second MLP network with four output neurons is used to classify the four categories of heart valve disease.The network is trained and tested using the second data set as shown in Table VII while the accuracy of the network is shown in Table VIII.The results shows that the second network of hierarchical method can achieve 100% testing accuracy at many numbers of hidden neurons.All networks except the 1 hidden neuron network have successfully trained with training accuracy of 100%.The best average testing accuracy is 96.168% at 27 hidden neurons network.After ten times of testing, the 27 hidden neurons network have perfectly categorized 174 abnormal heart sound samples to their classes with MSE 1x10 -24 and 99 epochs.The combination of first and second network of hierarchical method had produced 100% accuracy, which is better than the first classification method with only 85.71% accuracy.This results show that the division of classification category using hierarchical technique of MLP network had improved the classification accuracy because the difficulties or complexity of classification had been reduced.VI.CONCLUSION This study has proved that classification of heart sound signal using standard MLP network can be increased using the hierarchical MLP network.Two data sets had been used.The first data set is the simulated data which can be easily classified by using the standard MLP network with 100% accuracy.However the standard MLP network can only classifies the heart sound signals up to 85.71% accuracy only when second data set is used (real data from patients).The accuracy is improved to 100% when hierarchical MLP network is used.The results show that the division of classification category using hierarchical technique of MLP network had improved the classification accuracy because the difficulties or complexity of classification had been reduced.

Fig. 1 .
Fig. 1.Power spectrum of reference heart sound sample

Fig. 2 .
Fig. 2. Cross-correlation plot for five category of heart sound IV.CLASSIFICATION PROCESS Two sets of feed forward Multi-Layer Perceptron (MLP) network structures are used in the classification process to obtain the best classification accuracy.The first MLP network classifies 5 categories of normal and four type of heart valve disease.Fig. 3 shows the network structure.The network used 50 input neurons for 50 cross-correlation values of a sample and 5 output neurons for 5 categories of heart sound signals.Using an output neuron for a category will make the training process easier.This is because the network only has to

Fig. 3 .
Fig. 3. Classification of 5 categories of heart sound signal using usual MLP network.

Fig. 4 .
Fig. 4. Classification of 5 categories of heart sound signal using hierarchical MLP network.

TABLE II .
NUMBER OF SAMPLES FOR THE STANDARD MLP TRAINING AND TESTING

TABLE III .
CLASSIFICATION ACCURACY OF 5 CATEGORIES OF HEART SOUND SIGNALS AFTER 10 TRIALS AT 30 DIFFERENT HIDDEN NEURONS USING THE FIRST METHOD ON FIRST DATA SET

TABLE IV .
CLASSIFICATION ACCURACY OF 5 CATEGORIES OF HEART SOUND SIGNALS AFTER 10 TRIALS AT 30 DIFFERENT HIDDEN NEURONS USING THE FIRST METHOD ON SECOND DATA SET

Hidden Neuron Average Accuracy after 10 Trials (%) The Best Trained Network for Each Hidden Neuron No. of Epoch Mean Square Error (MSE)
A total of 646 of normal and abnormal heart sound samples from 39 subjects of the second data set are used in this study to obtain the classification accuracy of normal and abnormal heart sound signals.This data is exactly the same data used in the classification of the first method only the output or heart sound categories are different.The samples in each data set are divided manually about 60% for neural network training and 40% for neural network testing.The details about the samples are shown in Table V.The classification result is shown in Table VI.

TABLE V .
NUMBER OF SAMPLES FOR THE FIRST NETWORK TRAINING AND TESTING

TABLE VI .
CLASSIFICATION ACCURACY OF NORMAL AND ABNORMAL HEART SOUND SIGNALS AFTER 10 TRIALS AT 30 DIFFERENT HIDDEN NEURONS USING THE FIRST NETWORK OF THE SECOND METHOD

TABLE VII .
NUMBER OF SAMPLES FOR THE SECOND NETWORK TRAINING AND TESTING

TABLE VIII .
CLASSIFICATION ACCURACY OF 4 CATEGORIES OF HEART SOUND SIGNALS AFTER 10 TRIALS AT 30 DIFFERENT HIDDEN NEURONS USING THE SECOND NETWORK OF THE SECOND METHOD