PhonoSys: Mobile Phonocardiography Diagnostic System for PhonoSys: Mobile Phonocardiography Diagnostic System for Newborns Newborns

Heart murmurs have been found to be a life threatening condition for the newborns who are born with cardiac abnormalities. The ﬁrst sign of pathological changes of heart valves appear in phonocardiogram (PCG) which contains very useful information about cardiovascular system. It is a challenging venture to distinguish pathological murmurs from innocent ones. In this paper, we have developed a diagnostic algorithm called PhonoSys to analyze PCG using random forest. PhonoSys algorithm will run on mobile devices for remote PCG analysis. We recorded PCG signals from 120 newborns who are either healthy or with cardiac abnormalities. Eventually, in this study, 97.6% accuracy, 96.8% sensitivity, and 98.4% speciﬁcity were obtained to classify between innocent and pathological murmurs.


INTRODUCTION
Heart murmur have been reported in 0.3-77.4% of newborns, with prevalence dependent on several factors, innocent or pathological.S. B. Ainsworth et al published study of heart murmurs in 1999, which indicates 46% has innocent murmurs and 54% of newborns with murmurs are underling pathological case [1].
PCG contains very important information of cardiovascular system which is widely used by physicians to evaluate cardiac functions in patients and detect the presence of abnormalities.PCG is produced by vibrations of heart and blood circulation which creates two major sounds (S1 and S2) and heart murmurs.A murmur that caused by contracting of the heart muscle is called systolic murmur which is located between S1 and S2.A murmur that occurs when the heart muscle relaxes between beats is called a diastolic murmur which is located between S2 and S1.Nowadays signals produced by the heart are not only heard using a stethoscope but also observed as PCG on a screen (see figure 1).Newborns often have heart murmurs that mostly originate from normal flow patterns with no structural or anatomic abnormalities of the heart or vessels.The type-I of murmur referred to as innocent, physiological or normal murmurs.For instance the most common cause of murmur in newborns is when a specific condition called patent ductus arteriosus (PDA) occurs; it is often detected shortly after birth, most commonly in premature newborns [7].PDA is a potentially serious condition in which blood circulates abnormally between two of the major arteries near the heart, due to the failure of a blood vessel between these arteries to properly close.In most cases, the only symptom of PDA is a heart murmur until the ductus closes on its own shortly after birth [3].If the murmur is still present at 2 weeks, there is a possibility of murmur type-II and paediatrician may refer newborn to the cardiologist.
The second type of murmurs are caused by a problem in structure of the heart and is called pathological or abnormal heart murmurs.A problem with the structure of the heart that is present at birth is called Congenital Heart Defect (CHD) [12].CHDs are the most common type of birth defect.
Some babies born with a CHD can appear healthy at first and can be sent home with their family before their heart defect is treated or needs a regular health care.CHDs affect approximately 1 in 125 live births [10] .Of these, 30% have extra-cardiac anomalies (such as tracheoesophageal fistula, anorectal anomalies), which might require surgery within the first year of life [13].These babies are at risk for having serious problems within the first few days or weeks of life and often require emergency care.
It is a challenging venture to distinguish pathological murmurs from innocent ones.In this paper we have developed a diagnostic algorithm called PhonoSys to analyze PCG using random forest.

RELATED WORK
The basic technique by S. Yuenyong [14], which reports an automatic tele-auscultation system.Segmentation of the heart sound is performed ECG signal as reference.Feature vector is constructed for each cardiac cycle by analyzing the systole and diastole of each cycle by applying discrete wavelet transform.Features were classified using pattern recognition neural network.
W. Jin-gang [9] introduces a remote monitoring system for PCG is constructed, which integrates embedded Internet technology and wireless technology.
T. Chen [6] reports preliminary work performed on a gold standard database and a cellphone platform.Results indicate that HR and HRV can be accurately assessed from PCG using only a cellphone and hands-free kit.Heart sound analysis software, which can run on a standard cellphone in real time, has been developed that detects S1 heart sounds with a sensitivity of 92.1% and a positive predictivity of 88.4%.But there are a very few works that allow extracting pathological information from PCG.In this paper, we demonstrate an approach to classify clinically-relevant, pathological data from PCG on mobile devices.

METHODS
The PhonoSys algorithm consists of four major steps:

Data acquisition
PCG data has recorded by an electronic stethoscope which was connected to a mobile, We recorded the PCG data from 120 newborns who were 1-20 old at Imam Ghaem Hospital, Mashhad, Iran.All newborns were visited by a cardiologist who used echocardiography to label the PCG data with information on murmur no murmur.The label for specifying it that murmur is innocent or pathological.We received consent of all parents.

Pre-processing
Data has recorded in many situations in hospital and clinic that the signal is corrupted by different types of noise, such as power line, electromyographic, respiration and microphone movement artifact, which can affect on PCG signals and the algorithm.The preprocessing stage improves the classification accuracy of any algorithm; because, it gives us more accurate features.Figure 3 shows a spectrogram of PCG signal.Since the main spectrum of PCG occurs within the range of 150 Hz, the system filters the original PCG using a 3rd order bandpass Butterworth filter, with cut-off frequencies at 50-200 Hz.The second step of preprocessing is segmentation.We devised and implemented an algorithm aimed at identifying S1 and S2 based on the timing between high-amplitude components.To this end, we used the Gabor Wavelet for peak detection (see [8]), which can be formally described as follows: where e −jwt •e −t 2 is the complex Gaussian function and C is a normalizing constant.The threshold was used to identify the peaks.The threshold value was set to 0.1 for wavelet scale coefficients (PCG components).Latter step is zero-crossing which has used to find the spots where peaks occur, the number of zero crossings per segment being also an equivalent representation of the dominant component of a signal segment.The algorithm calculates the size of the intervals in which the value of the function is zero (systolic and diastolic).Let us recall that systolic (S1-S2) and diastolic (S2-S1) murmurs occur respectively in the smaller and bigger time interval (see Figure 4).
After segmentation for detecting PCG components and heart murmurs (systolic and diastolic murmurs), it is very important to select a cycle instead of whole signal which can reduce the number of data and the cost of computing.The proposed algorithm to find best cycle is based on which cycle shows more signs of heart disease -as detecting the most informative cycle can optimize the performance of the classification process.For each patient, recorded data include where: 1 The Pearson correlation coefficient is calculated between pairs of signals, each signal including several cycles.An example of correlation is is shown in Table 3.2.The overall correlation for each cardiac cycle Ci,j is obtained through the following formula: where n is the number of cardiac cycles.In the given example C4 and C2 are selected as best and worst cycles according to Equation ( 3) which means the cycle with minimum and maximum noise (and hence with the most informative content for the whole signal).

Feature extraction
This phase is focused on extracting features of the signal that better highlight characteristic properties of the PCG signal, with the goal of identifying those that are more suitable for the classification purpose.The features extraction are proposed for two goals, heart murmurs detection and diagnosis.
Different signal processing tools are used on smart-phone or tablets for detecting heart murmurs.For instance, maximum and minimum value amplitude, total Absolute Area, 1 n is number of data pairs for each sample; in this case 1500.peak to peak time window and variance are some of these signal processing tools that are used on smart phone or tablet.
Based on our research a range value has defined for each categorizes.The smart-phone display that the newborn has heart murmurs or no.If yes, smart-phone send selected cycle to cloud for future computing.Is that an innocent or pathological murmur?The algorithm on smart-phone is defined as: • Recording or receiving PCG signals.
• Filtering for removing unwanted noises.
• Segment signal into systolic and diastolic murmurs.
• Data reduction by selecting the best cardiac cycle.
• Features extraction to detect heart murmurs, Is there any heart murmurs?
1. Yes, Send selected cardiac cycle for heart murmurs diagnosis (innocent or pathological murmur)

No, display data as normal and without heart murmurs
The latter step was aimed at, extracting features according to distinguish between innocent and pathological murmurs.Features are extracted on the basis of signal information in alternative domains, such as time, frequency, or time-frequency domains.The features with respect to the templates were Shannon Energy, Bispectrum, Wigner Distribution and Wigner Bispectrum [2].

Classification
A novel application of random forest for clinical and physiological data in monitoring and remote diagnosis is presented in this work.The random forest methodology, developed by Leo Breiman [5] in 2001 .Random forest has been proved an excellent performance in classification tasks which is a general class of ensemble building methods using a decision tree as the base classifier [11].Random forest is an ensemble learning algorithm that composed of a collection of individual treestructured classifiers, and the output is based on majority vote among the random tree classifiers (see figure 5).
The learning algorithm choose their splitting features from a random subset of k features at each internal node.Randomness is injected into each tree in two ways, the utilize of bootstrapping to sample from the original dataset or by growing each tree on different random subsamples and determining splitter partly at random [6,4].In the each decision tree for predicting heart murmurs, we start at the top of the tree and follow different branches, depending on conditions involving the predictor variables.Once we arrive at an end-point of the tree, we used 50 trees and variables classified in two classes (0=innocent and 1=pathological murmurs).

EXPERIMENTS AND RESULTS
The likelihood ratio (LR) is calculated to archiving sensitivity and specificity on a random forest, define into positive and negative ratio as follows: Likelihood ratio positive is the probability for a newborn that has pathological murmur of being classified as unhealthy, divided by the probability for a newborn that given test result would be expected as healthy.Likelihood ratio negative is the probability for a newborn that has innocent murmur of being classified as healthy, divided by the probability for a newborn that given test result would be expected as unhealthy.
Table 2 in the form of a confusion matrix presents the results for real-time classification of PCG data with accuracy percentage.Experiments have been performed on a balanced set of 120 samples (meaning that the number of samples was the same for innocent and pathological murmurs).It can be seen that out of 60 PCG signal with innocent murmur, 59 were recognized as healthy and 1.6% were not recognized.Similarly, out of 60 PCG signal with pathological murmur, 58 were recognized as pathological and 2 were not recognized.Overall sensitivity for pathological murmur was 96.8% with a specificity of 98.4%.

CONCLUSION
PhonoSys is an mHealth system for monitoring and remote diagnosis of heart murmurs using PCG signal.We provided an implementation of algorithm framework for monitoring PCG signal and a remote diagnosis of heart murmurs on mobile devices.This methods includes novelties in both, reducing amount of data by selecting best cycle, and applying random forest algorithm.The diagnostic system shows a high fidelity to distinguishing between innocent and pathological murmurs.The proposed system will aid physicians in remote monitoring and diagnosis of patients using mobile device and/or wearable sensors.

Figure 1 :
Figure 1: Sample of two-cycle PCG, where components S1, S2 and heart murmurs are highlighted.

Figure 4 :
Figure 4: PCG segmentation to detect systolic and diastolic area; a) Raw signal, b) Complex Gaussian Wavelet coefficients.

Figure 5 :
Figure 5: Structure of the random forest classifier.

Table 1 :
The average coefficients of correlation between cycles.

Table 2 :
Classification result of heart murmurs in newborns.