# Heart Sound Classification Using Wavelet Analysis Approaches and Ensemble of Deep Learning Models
## 3 Proposed Method
### Feature Extraction
#### 3.2.1 Wavelet Scattering Transform  
Wavelet scattering transform is a method for analyzing multiple scales and frequencies, and can analyze signals through filler modulus, which can extract information and features about transform invariance [25; 26]. In this way, it is possible to remove the characteristic information such as the period, frequency, and intensity of the heartbeat at various positions in the PCG signal, the noise of the measurement equipment generated during acquisition, and the noise generated in the surrounding environment. Therefore, important characteristic information in the signal can be extracted to analyze the heart health information and diagnose the heart related disease. Wavelet scattering transformation analyzes signals through a hierarchical method of wavelet analysis using a wavelet filter, calculation using the filtered modulus, and averaging, in which features are extracted through a scale filter. Features are extracted repeatedly such that the first output becomes the second input, and wavelet scattering is composed of a tree structure algorithm, as shown in Figure 3 [18].  
Figure 1: Heart sound classification architecture using wavelet analysis technology and an ensemble of deep learning models.  
[Step 1] The 0 order scattering coefficient of the wavelet scattering transform is calculated through a convolution operation with the input data signal \(y\) and is defined by Equation (1). \(\phi(n)\) represents the scale function. The scale function allows a hierarchical analysis of signals and is used for feature extraction.  
\[N_{0}y=y\times\phi(n) \tag{1}\]  
[Step 2] For the 1 st order scattering coefficient, the modulus calculation is obtained using the complex wavelet \(\psi_{\lambda}\), as shown in Equation (2), and the 1 st order scattering coefficient is obtained through averaging in Equation (3).  
\[C_{1}y= |y\times\psi_{\lambda}(t)| \tag{2}\]  
\[N_{1}y(c,\lambda)=|y(t)\times\psi_{\lambda}\times\phi(n)| \tag{3}\]  
Figure 3: Structural algorithm of wavelet scattering.  
Figure 2: Signal segmentation process for Abnormal and Normal classes of PhysioNet/CinC 2016 Challenge Dataset.  
[Step 3] For the 1 st order scattering coefficient, the modulus calculation is obtained using the complex. The 2 nd order scattering coefficient repeats the step of generating the 1 st order scattering coefficient to calculate the second modulus, as shown in Equation (4), and generates the second scattering coefficient through Equation (5).  
\[C_{2}y(c,\lambda_{1},\lambda_{2})= \big{|}\big{|}y\times\psi_{\lambda_{1}}\big{|}\times\psi_{\lambda_ {2}}\big{|} \tag{4}\]  
\[N_{2}y(c,\lambda_{1},\lambda_{2})= \big{|}\big{|}y\times\psi_{\lambda_{1}}\big{|}\times\psi_{\lambda_ {2}}\big{|}\times\phi(n) \tag{5}\]  
[Step 4] The N-th order scattering coefficient can be generated by repeating the steps for generating the 1 st order and 2 nd order scattering coefficients.  
Figure 4 shows some signals from which features were extracted using the WST for the Normal, Murmur, Extrahls Heart Sound, and Artifact classes of the PASCAL Classifying Heart Sounds Challenge Dataset A.