A novel intelligent system based on adjustable classifier models for diagnosing heart sounds

A novel intelligent diagnostic system is proposed to diagnose heart sounds (HSs). The innovations of this system are primarily reflected in the automatic segmentation and extraction of the first complex sound \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$({ CS }_{1})$$\end{document}(CS1) and second complex sound \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$({ CS }_{2})$$\end{document}(CS2); the automatic extraction of the secondary envelope-based diagnostic features \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\gamma _{_1}$$\end{document}γ1, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\gamma _{_2}$$\end{document}γ2, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\gamma _{_3}$$\end{document}γ3 from \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${ CS }_{1}$$\end{document}CS1 and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${ CS }_{2}$$\end{document}CS2; and the adjustable classifier models that correspond to the confidence bounds of the Chi-square (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\chi ^{2}$$\end{document}χ2) distribution and are adjusted by the given confidence levels (denoted as \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\beta$$\end{document}β). The three stages of the proposed system are summarized as follows. In stage 1, the short time modified Hilbert transform (STMHT)-based curve is used to segment and extract \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${ CS }_{1}$$\end{document}CS1 and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${ CS }_{2}$$\end{document}CS2. In stage 2, the envelopes \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${ CS _{1}}_{\mathrm{F_{E}}}$$\end{document}CS1FE and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${ CS _{2}}_{\mathrm{F_{E}}}$$\end{document}CS2FE for periods \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${ CS }_{1}$$\end{document}CS1 and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${ CS }_{2}$$\end{document}CS2 are obtained via a novel method, and the frequency features are automatically extracted from \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${ CS _{1}}_{\mathrm{F_{E}}}$$\end{document}CS1FE and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${ CS _{2}}_{\mathrm{F_{E}}}$$\end{document}CS2FE by setting different threshold value (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$Thv$$\end{document}Thv) lines. Finally, the first three principal components determined based on principal component analysis (PCA) are used as the diagnostic features. In stage 3, a Gaussian mixture model (GMM)-based component objective function \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$f_{ et }(\mathbf{x })$$\end{document}fet(x) is generated. Then, the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\chi ^{2}$$\end{document}χ2 distribution for component k is determined by calculating the Mahalanobis distance from \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathbf{x }}$$\end{document}x to the class mean \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mu _{_k}$$\end{document}μk for component k, and the confidence region of component k is determined by adjusting the optimal confidence level \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\beta _{k}$$\end{document}βk and used as the criterion to diagnose HSs. The performance evaluation was validated by sounds from online HS databases and clinical heart databases. The accuracy of the proposed method was compared to the accuracies of other state-of-the-art methods, and the highest classification accuracies of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$99.43\%$$\end{document}99.43%, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$98.93\%$$\end{document}98.93%, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$99.13\%$$\end{document}99.13%, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$99.85\%$$\end{document}99.85%, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$98.62\%$$\end{document}98.62%, 99.67\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\%$$\end{document}% and 99.91\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\%$$\end{document}% in the detection of MR, MS, ASD, NM, AS, AR and VSD sounds were achieved by setting \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\beta _{k}(k=1, 2, \ldots , 7)$$\end{document}βk(k=1,2,…,7) to 0.87,0.65,0.67,0.65,0.67,0.79 and 0.87, respectively.


Background.
As an efficient method, using heart sound (HS) analysis is often used to evaluate heart function; this approach has been widely used to diagnose heart disease and evaluate heart functions, such as congenital heart disease classification 1 , ventricular septal defect detection 2 , blood pressure estimation 3 and congenital heart disease screening 4 , for children and adults. A normal HS is primarily composed of two basic sounds: the first sound ( S 1 ) which is generated by the closing of aortic valves and the vibrations associated with tensing of the chordate trendiness and the ventricular walls, the second sound ( S 2 ) is produced by the closure of the aortic and pulmonic valves at the beginning of is volumetric ventricular relaxation. However, HSs with unitary murmurs generally occur between S 1 and S 2 with different noise patterns 5 . Therefore, analyses of S 1 , S2 , and the period between S 1 and S 2 play important roles in characterizing HS features with different types of information. Detailed information for S 1 , S 2 , and the sounds between S 1 and S 2 can be used to accurately classify HS. Additionally, to avoid analyzing the sounds between S 1 and S 2 , which are generally segmented from HSs with low accuracy, S 1 and part of the period between S 1 and S 2 are integrated to obtain CS 1 , and S 2 and the part of the period between S 1 and S 2 are integrated to form CS 2 . Then, the features are efficiently extracted from CS 1 and CS 2 . Finally, a classification method is established to diagnose heart diseases.
• CS 1 and CS 2 extraction The studies regarding HS segmentation can be summarized into two branches: one branch includes studies that segment each cardiac cycle into a sequence of four heart stages: S 1 −→ Systole period −→ S 2 −→ Diastole period 6,7 . As a result, the four fundamental stages to be segmented are different due to the nonstationary nature of an abnormal HSs signal and the effect of background noise. The other branch includes studies that segment a periodic HSs into a sequence of two heart stages, which are expressed as CS 1 OnepartofDiastole → S 1 → OnepartofSystole TheotherofDiastole → S 2 → TheotherofSystole based on the STMHT algorithm; this approach was reported to be successfully applied in diagnosing heart diseases, such as in ventricular septal defect (VSD) diagnosis 8 and several kinds of heart disease diagnosis 9 . Moreover, study 9 noted that the use of frequency features was more efficient in distinguishing normal from abnormal sounds than was the use of time features. Therefore, an efficient frequency feature extraction method should be developed.
• Feature extraction As an important component of efficient feature extraction, the frequency width of the envelope over a given threshold value ( Thv ) has been verified to be useful for detecting heart diseases [8][9][10][11] . However, for many types of HSs, it is difficult to extract frequency widths with an unsuitable Thv due to the existence of a non smooth envelope. To extract the frequency widths for a smooth envelope without setting different Thv values, the smooth envelope can be treated as a secondary envelope, as proposed in 9 , and used to automatically extract the frequency feature matrix based on the STMHT technique; this method was successfully applied to detect different types of heart diseases. However, for mitral stenosis and mitral regurgitation noises, the feature matrix was not easily extracted because the second frequency component was missing. Therefore, to improve the classification accuracy for diagnosing different types of heart disease and simplify the complexity of the diagnostic method, the smooth envelopes for CS 1 and CS 2 extraction in the frequency domain must be considered; additionally, more frequency widths corresponding to different Thv values should be used, and dimensionality reduction should be employed to reduce the number of features considered . Such a classification method could be applied in the efficient extraction of features for diagnosing heart diseases.
• Classifier model Gaussian mixture models (GMMs) have been used in a wide variety of clustering applications 12-18 due to their powerful mathematical characteristics. Confidence regions are used to diagnose the detection data x in GMMs, and the optimal confidence regions is determined based on Mahalanobis distance following the Chi-square ( χ 2 ) distribution. Thus, classifier models with adjustable sizes corresponding to the confidence bounds of the Chi-square ( χ 2 ) distribution, which can be adjusted by changing the desired confidence level (denoted as β ), are proposed. The χ 2 confidence bounds used as the classification criteria are employed to diagnose heart diseases.
Major contributions and organization. In summary, this study proposes an innovative and intelligent system. The major contributions in this study are (1) the STMHT-based CS 1 and CS 2 are automatically located and extracted; (2) a novel method for obtaining the secondary curves of CS 1 and CS 2 are extracted in the frequency domain; (3) frequency features are automatically extracted over the given threshold value; (4) the diagnostic features γ 1 , γ 2 and γ 3 are determined based on PCA; and (5) the confidence region of the χ 2 distribution, which are adjusted based on the desired β , is determined and used as the classification criterion for diagnosing a given HS. The remainder of this paper is organized as follows. Section "Methodology" presents the approach for determining the diagnostic features [γ 1 , γ 2 , γ 3 ] , and a definition of the confidence region-based diagnostic method for diagnosing heart diseases. In "Performance evaluation" section, the performance of the proposed method is compared with that of other efficient methods for diagnosing heart diseases. In "Conclusion" section, the conclusions are provided. Finally, the future study is pointed out in "Future study".

Methodology
This study was approved by the ethics committee of Nanyang Institute of Technology (Approval Number:2016-06) and the informed consent was waived by the ethics committee of Nanyang Institute of Technology. The present study was also conducted in accordance with the tenets of the 1975 Declaration of Helsinki, as revised in 2008 19 . The flow chart of the proposed intelligent system, shown in Fig. 1, consists of three stages: the automatic location and extraction of CS 1 and CS 2 ; the automatic determination of frequency features γ 1 , γ 2 and γ 3 ; and the establishment of the Mahalanobis distance criterion-based diagnostic method. In stage 1, the STMHT-based curve (denoted as HS STMHT ), which is extracted for the HS E envelope generated by the HS, is used to segment and extract CS 1 and CS 2 from the HS (Fig. 1A). In stage 2, the envelopes CS1 F E and CS2 F E for every period CS1 and CS2 are obtained via a novel method, and the frequency features are automatically extracted from CS 1F E and CS 2F E by setting different Thv lines. Finally, the first three principal components, γ 1 , γ 2 and γ 3 , which express 86.7% of the FF information, are determined and used as diagnostic features (Fig. 1B, C). In stage 3, the GMM-based mixed classification objective function f et (x) which combines component k with respect to the parameters π k , µ k , and k and the features x = [γ 1 , γ 2 , γ 3 ] , is generated. Then, the χ 2 distribution for component k is determined by calculating the Mahalanobis distance from x to the class mean µ k of component k, and the adjustable confidence bound (denoted as MDC k shown in Fig. 1E) is determined to diagnose heart diseases.  www.nature.com/scientificreports/ Stage 1: Automatic extraction of CS 1 and CS 2 . As shown in Fig. 2, five steps consisting of heart sound auscultation, heart sound preprocessing, heart sound envelope extraction, STMHT extraction, and CS 1 and CS 2 extraction, which is used to construct the procedure of the CS 1 and CS 2 extraction and is detailed in the following steps.
Step A: Heart sound auscultation. Auscultation is performed for the purposes of examination cardiovascular. As described in previous study 8 , the original heart sound, denoted as S T (colored in blue line as shown in Fig. 2), are collected by 3M-3200 electronic stethoscope with a F s = 44.1k Hz sample rate which is widely used by many doctors and produced by American 3M company 20 , and the tricuspid area is selected as the auscultation area due to the tricuspid area reported to supply more important information 21 . Meanwhile, you can hear the sounds when auscultating heart sounds, ensuring that we avoid as much environmental noise as possible during the auscultation procedure. Even so, the collected heart sounds still need to be preprocessing for canceling the invalid components.
Step B: WD-based heart sound preprocessing. HSs are reported to be primarily dispersed in the frequency range of 20∼700 Hz 2, 8,9 . Therefore, according to the sampling frequency ( Fs = 44.1 kHz), WD-based HSs are filtered to obtain the efficient frequency components ( 21.5 ∼ 689 Hz). The Daubechies wavelet 10 (dB10) has been used to give the maximum signal-to-noise ratio and minimum root-mean-square error for HSs 22 . Therefore, dB10 is selected for use as the mother wavelet for preprocessing HSs. A filtered and normalized sound, colored by gray and denoted as HS T , is shown in Fig. 2.
Step C: heart sound envelope (HS E ) extraction. The Viola integral-based envelope, denoted as HS E , is extracted from the heart sound HS T , as reported in studies 8,9 ; this envelope can effective overcome amplitude variations and complex backgrounds and noise. This concept is described as follows. where W m = 2205 if the duration of CS 1 or CS 2 greater than 0.13 s. Finally, normalization is performed by setting the maximum amplitude of HS E to 1 (Fig. 2).
Step D: STMHT extraction for HS. Given an M-point HS, the STMHT for the HSs , HS STMHT , is computed from Eq. (3) Step E: Automatic extraction of CS 1 and CS 2 . The characteristics of HS STMHT considered in studies 2,8 , as shown in Fig. 3A, C, are summarized as follows: 1 The negative-to-positive (N2P) points of HS STMHT , denoted by , correspond to the geometry center peaks of S 1 and S 2 ; 2 The geometry center between S 1 and S 2 , denoted by is determined by the positive-to-negative P2N points of HS STMHT . Moreover, the interval from S 2 to S 1 is generally greater than that from S 1 to S 2 in one period of an HS [23][24][25] . Therefore, the N2P and P2N-based CS 1 and CS 2 features can be automatically segmented from one period of an HS and extracted by two procedures, as described as follows.
(1) N2P and P2N location The algorithm for detecting N2P and P2N is detailed as follows.
1 First, the signum function of HS STMHT , denoted as S HS STMHT , is calculated by 2 Then, the variation in S HS STMHT ( DS HS STMHT ) is determined from Eq. (6) 3 Finally, N2P and P2N are determined by 2 Determine the points CS 12 and CS 21 that are used for segmentation from CS 1 to CS 2 and from CS 2 to CS 1 , respectively, by using Eq. (9).
3 Extract CS 1 (denoted as CS 1i ) and CS 2 (denoted as CS 2i ) for the ith period of an HS as follows | · | is the absolute value sign, 2L 1 + 1 is the first window width, and 2L 2 + 1 is the second window width. According to studies 9,28 , L 1 and L 2 are set to 9 and 17, respectively. Moreover, HS F E is also normalized by setting the maximum amplitude of HS F E to 1. The secondary envelopes for CS 1 and CS 2 , denoted as CS 1F E and CS 2F E respectively, are illustrated by using the examples described in Fig Table 1.   34 , and healthy undergraduates from Nanyang Institute of Technology, China)(whom I thank for the data used in this study)). Moreover, the boxplots for the features are plotted in Fig. 6, where Fig. 6A shows the features extracted from CS 1 and Fig. 6B shows the features from CS 2 for each type of heart disease. The scatter plots of features in Fig. 6 illustrate the discrimination ability of the model in distinguishing among different heart diseases and highlighting the following findings: 1 The MS and VSD sounds are easy to distinguish from the other sounds by using CS 1FW1 (Fig. 6A), and by using the CS 2FW1 (Fig. 6B), the VSD sound is easy to distinguish from the other sounds; 2 The MS sound is easy to distinguish from the other sounds based on CS 1FW2 (Fig. 6A), and by using the CS 2FW2 (Fig. 6B), the AR and VSD sounds www.nature.com/scientificreports/ are distinguished from other sounds; 3 The NM sound is easy to distinguish from other sounds using CS 1FW3 (Fig. 6A). 4 The AR and VSD sounds are easy to distinguish from the other sounds using CS 2FW3 , as shown in Fig. 6B; 5 Fig. 6A indicates that CS 1G can be used to easily distinguish MR from other sounds and the AS and ASD sounds from other sounds; 6 Fig. 6B shows that the distribution of CS 2G from AS sounds is different from that for other sounds, except NM sounds. The analysis results discussed above indicate that different combinations of several features defined by Eq. (15) can be used to distinguish among various types of heart disease. Therefore, to simplify features and develop a diagnostic method that is simple and effective, dimension reduction is used to determine new features; this process is described in detail as follows.   Figure 6. Box plot representation of FF for each type of heart disease. A shows the box plots for features from CS 1 . In addition, B represents the features from CS 2 . www.nature.com/scientificreports/ Diagnostic feature determination. To simplify the computation when using features to diagnose heart diseases, PCA, a linear dimensionality reduction technique for finding principal components and replacing high-dimension data in many studies, such as studies on heart arrhythmias classification 35 , heart disease classification 2,36 , emotion recognition 37 , respiratory rate extraction 38 and electrocardiogram heart disease diagnosis 39 , is employed to generate a few efficient principal components to characterize HS features and diagnose heart diseases. The algorithm corresponding to the generation of new features via PCA for a given data set FF is described as Algorithm 1. The eigenvector ξ i in Algorithm 1 , which corresponds to the eigenvalue i and is calculated for the matrix Z in step 2, as shown in Table 3, is the actual weighted coefficient for the ith principal component γ i . Table 3 shows that the largest absolute coefficients in the first principal component γ 1 are CS 1FW1 , CS 2FW2 and CS 1FW2 ; the second principal component γ 2 is mainly weighted based on CS 1G , CS 2FW2 , CS 1FW1 and CS 2FW3 ; and the third component γ 3 is mainly weighted based on CS 1FW2 , CS 1FW3 and CS 2FW3 (Table 3). To determine the smallest number of principal components m should be considered, the Pareto chart is used; this chart provides a tool for visualizing the Pareto principle, which states that observing a small set of variables that influence a common outcome is more common than detecting many variables that influence the same outcome. This approach has been used to determine the percent variability explained by each principal component (Fig. 7A). Therefore, according to the smallest m value such that η � (m) > 80% 40 , combined with the scatter plot for the first m principal components, the smallest m is determined. The Pareto chart of the PCA results in Fig. 7A shows the explained variance and accumulated variance for each principal component γ i , where i = 1, 2, . . . , 8 . According to Fig. 7A, 67.58% of the total variance is captured by the first two components, γ 1 and γ 2 , and 86.73% of the total variance is captured by the first three components γ 1 , γ 2 and γ 3 . Therefore, the following conclusions can be obtained.
• γ 1 and γ 2 lead to a dimensionality reduction of 75% (from 8 to 2 variables) and only 32.42% information loss. The scatter diagram of γ 1 and γ 2 given in Fig. 7B indicates that although the distribution region corresponding to each type of heart disease is obviously different and the overlaps between MR and other diseases, AR and other diseases, and VSD and other diseases are small, the overlaps among MS, ASD, NM, and AS are relatively large; therefore, it is difficult to accurately distinguish among these four types of heart diseases. • However, the scatter diagram of γ 1 , γ 2 and γ 3 , plotted in Fig. 7C, shows that there are different distribution regions for these types of heart diseases. In addition, η � (3) = 86.73% , as shown in Fig. 7A, based on feature number determination 40 . Thus, γ 1 , γ 2 and γ 3 lead to a dimensionality reduction of 62.5% (from 8 to 3 variables) with only 13.27% information loss. The scatter diagram of γ 1 , γ 2 and γ 3 in Fig. 7C is used to verify the different distribution regions corresponding to these types of heart diseases.
Therefore, m is set to 3, and the new 3-dimensional feature matrices consisting of γ 1 , γ 2 and γ 3 (see Fig. 7C) are used to diagnose heart diseases.

Stage 3: classification based on the squared Mahalanobis distance criterion. Classifier determi-
nation. The squared Mahalanobis distance classification criterion-based diagnostic methodology, consisting of the five sequential steps as shown in the flow chart (Fig. 8A), is proposed to diagnose HSs and is described in the following 5 steps.
Step 1: GMM-based µ k and k generation. In the design step of GMM, the estimated target function, f et (x) , is a mixture of d-dimensional normal Gaussian distributions p(x|µ k , � k ) that reflect the training pattern of each component; it is assumed that components can be modeled by mixtures of normal Gaussian distributions by where expresses the posterior probabilities corresponding to each component; K is the number of components; π k corresponds to the mixed weights, such that K k=1 π k = 1 ; and µ k and k are the mean value and covariance matrix of the k th component, respectively. Because the goal is to maximize the function f et (x) , the parameters ( π k , µ k , and k ) are determined based on the EM algorithm 41 for a set of sample records. Based on the types of heart disease described in Sect. 2.2 and the scatter diagram plotted in Fig. 7C, the number of Gaussian mixture components is set to K = 7 , and the fitgmdist function in MATLAB 2018b is used to return a GMM with K = 7 components fitted to the features [γ 1 , γ 2 , γ 3 ] established in Sect. 2.2 using the EM algorithm by assigning a posterior probability to each component density with respect to each observation. Furthermore, the regularization value is set as 0.01 to avoid ill-conditioned covariance estimates, and the number of optimization iterations is set to 1000 based on experience. The Gaussian mixture parameter estimates for π k , µ k and k are obtained and shown in Table 4. To characterize the 3-dimensional interspace corresponding to each 3-dimensional Gaussian component for diagnosing heart diseases, the 3-dimensional interspaces can be used as 3-dimensional classifiers to diagnose heart diseases with high classification accuracy; the overlapping interspace between two random www.nature.com/scientificreports/ components is made as small as possible, and the independent 3-dimensional interspace corresponding to each component is considered.
Step 2: χ 2 3 determination for the k th component in 3-dimensional interspace. Since the squared Mahalanobis distances for each Gaussian component follow the Chi-square distribution ( χ 2 3 ) in 3-dimensional interspace, to determine the decision region for classifying the test data x via the components estimated in the above step, the squared Mahalanobis distance in 3-dimensional interspace for the k th component with mean µ k and full covariance matrix k , d 2 3 (x|µ k , � k ) , is computed as follows:    www.nature.com/scientificreports/ Therefore, χ 2 3 , which is constructed based on component k and denoted as χ 2 3 (µ k , � k ) , is determined by Therefore, the squared Mahalanobis distance d 2 3 (x|µ k , � k ) specified based on the desired confidence level, denoted as β k , can be used as the kth classifier criterion for determining whether feature x belongs to the kth class.  www.nature.com/scientificreports/ Step 3: The k th confidence level (β k ) determination. Actually, the kth confidence region, as specified by the kth desired confidence level β k , is surrounded by the kth ellipsoid, and this relation is expressed as where χ 2 3,β k is the inverse of χ 2 3 for a given confidence level β k , and MDC k represents the classification criterion for component k and satisfies the following equation For the χ 2 3 distribution, although the confidence regions corresponding to the confidence levels of 68.3% , 95% , and 97.5% are widely used classification criteria in many studies 2,42-45 , the optional β k is identified by setting β k ∈ [63 : 2 : 97]% combined with the following rules: 1) each ellipsoid should be as large as possible; 2) each common region should be as small as possible; and 3) the classification accuracy defined in Eq. (26) should be as high as possible. The classification accuracies for classifying sound data summarized in Sect. 2.2 are plotted in Figs. 9, and 9 shows the following results: 1 For VSD sounds, high accuracy can be achieved by setting the desired confidence level β to each value within the interval of ( 0.71 < β < 0.89 ), as shown in Fig. 9(VSD); 2 For AR and MR sounds, by setting the desired confidence level β based on β ∈ [0.69, 0.81] , high classification accuracy could be achieved (Fig. 9(MR and AR) ); 3 For MS, AS and NM sounds, to achieve the accurate classification of HSs, the interval of the desired confidence level β should be set as [0.63, 0.65] (Fig. 9); 4 For ASD sounds, Fig. 9(ASD) shows that the highest classification accuracy is achieved by setting the desired confidence level to β ∈ [0.63, 0.69] . Furthermore, the desired confidence level β can be adjusted to improve the classification accuracy and fit new datasets without reperforming the computations for the objective function, especially for VSD sounds and MR sounds (Fig. 9(VSD and MR)). In this study, according to the rules described above combined with the accuracy analysis results plotted in Fig. 9, the β k (k = 1, . . . , 7) values are set as 0.87, 0.65, 0.67, 0.65, 0.67, 0.79 and 0.87, respectively.
Step 4: MDC k determination corresponding to β k . Based on the k th confidence level achieved for β k in the above step, by using the function 'chi2inv' in MATLAB 2018b, the inverse of χ 2 3,β k , denoted as MDC k = χ 2 3,β k , is determined. The analysis results for the k th confidence region in the 3-dimensional interspace, which is surrounded by the k th ellipsoid corresponding to the k th desired confidence level β k , are determined and shown in Fig. 8B. Furthermore, Fig. 8B shows that the common regions between two random ellipsoids are almost zero; thus, a faulty decision process is avoided because the input will not fall into two or more categories.
Step 5: MDC k -based diagnostic result determination. Based on the ellipsoid surfaces region shown in Fig. 8B, the diagnosis method is described as follows.  Table 2.
2 Then, according to the confidence region shown in Fig. 8B

Performance evaluation
To evaluate the performance of the proposed methodology, the comparison between the proposed methodology and the state-of-the-art methods on the clinical sounds and online sounds data was conducted as follows.
• Total sounds: The total sounds, consisting of sounds described in Sect. 2.2 and new sounds, were summarized in Table 5 to evaluate the performance of this proposed methodology.
• State-of-the-art methods: To highlight the efficiency of the proposed methodology for diagnosing the seven typical heart diseases, the state-of-the-art methods, published in recent five years and described in Table 6, were comparatively analyzed.  Table 6. Efficient methods successfully used in diagnosing normal sounds from other common heart diseases.

Method
Year Performance evaluation The Fano-factor constrained tunable quality wavelet transform (TQWT) was the sensitivity and specificity of 86.32% and 99.44% respectively and overall score of 92.88% to detect abnormal heart sounds.

♯ 2 47 2021
This study proposed a heart sound classification method based on improved MFCC features and convolutional recurrent neural networks, which achieved classification accuracy of 98% in the 2016 PhysioNeT/CinC Challenge database with dropout rate of 0.5.  Table 7, where the parameters corresponding to the state-of-the-art methods were described in Table 8. The results in Table 7 support the following conclusions.
• Although using the method #1 to diagnose AS yielded a higher Sp than that of the proposed method, the CA was lower than that of the proposed method, partially due to the high Se achieved by the proposed method.
• Although using the method #3 to diagnose MS yielded a higher Sp than that of the proposed method, the CA was lower than that of the proposed method, partially due to the high Se achieved by the proposed method.
• Although using the method #5 to diagnose NM yielded a higher Sp than that of the proposed method, the CA was lower than that of the proposed method, partially due to the high Se achieved by the proposed method.
• For other sounds, the classification accuracies achieved in the proposed method were all greater than those of the other methods listed in Table 7 .
Overall, the efficiency of the proposed method in diagnosing MR, MS, ASD, NM, AS, AR and VSD diseases was evaluated by comparison with the other efficient methods listed in Table 7.

Conclusion
A novel intelligent system was proposed for diagnosing heart diseases with high CA . The innovation of this approach is primarily reflected in: 1) the automatic extraction of secondary envelope-based frequency features; 2) the automatic determination of PCA-based diagnostic features γ 1 , γ 2 and γ 3 ; and 3) the determination of adjustable confidence regions corresponding to the χ 2 distribution. The confidence regions are obtained by calculating the Mahalanobis distance, which is adjusted by the desired confidence level β , and the results were used as the classification criteria for diagnosing heart diseases. The procedure for the implementation of the intelligent Table 7. Comparative analysis of eight different methods for the diagnosis of heart diseases summarized in Table 5.   Table 8. The highest accuracies corresponding to the parameters set in every state-of-the-art method.

Method
Performance evaluation ♯ 1 46 The highest classification accuracies were obtained by using the features described in Table 3 on page 28.
The highest classification accuracies were obtained by using the 13-features extracted using MFCC algorithm.
♯ 3 48 The highest classification accuracies were obtained by using the porposed WaveNet model consists of 6 residual blocks.

♯ 4 8
The highest classification accuracies were obtained based on the rules described in a previous study 8 .
The highest CA results were obtained based on the following rules. Rule 8: If none of these conditions are met, the HS is undefined.
♯ 6 50 The most accurate results were obtained by the structure consisting of one input layer with 60 neurons, one hidden layer with 11 neurons and one output layer with five neurons. www.nature.com/scientificreports/ system involved three stages. Stage 1 described the location and extraction of STMHT-based CS 1 and CS 2 . In stage 2, in the frequency domain, a novel method was first proposed to generate the envelopes CS 1F E and CS 2F E ; then, based on the Thv lines, FF was automatically extracted. Finally, based on PCA, the first three principal components, γ 1 , γ 2 and γ 3 , which expressed 86.7% of the FF information, were determined and used as diagnostic features. In stage 3, the GMM-based objective function f et (x) with respect to the features x = [γ 1 , γ 2 , γ 3 ] and the parameters [ π k , µ k , k ], where k = 1, 2, . . . , K , was generated. Then, the χ 2 distribution for component k was determined by calculating the Mahalanobis distance from x to the class mean µ k of component k, and the confidence region for component k was determined by adjusting the optimal confidence level β k and used as the criterion (denoted as MDC k ) to diagnose a given HS. The performance evaluation was validated by sounds from online HS databases and clinical heart databases. The accuracy of the proposed method was compared to the accuracies of other well-known classifiers, and the highest classification accuracies of 99.43% , 98.93% , 99.13% , 99.85% , 98.62% , 99.67% and 99.91% in the detection of MR, MS, ASD, NM, AS, AR and VSD sounds were achieved by setting β k (k = 1, 2, . . . , 7) to 0.87,0.65,0.67,0.65,0.67,0.79 and 0.87, respectively. Therefore, this proposed intelligent diagnosis system provided an efficient way to diagnose seven types of heart diseases. The advantages and limitations were summarized as follows: • Advantages: 1 CS 1 and CS 2 were automatically extracted to reduce difficulty in segmenting each cardiac cycle into a sequence of four heart stages: S 1 −→ Systole period −→ S 2 −→ Diastole period; 2 More features could be extended by setting even more threshold values for the unknown heart diseases, especially for the heart sound with the compound heart diseases; 3 Every classifier achieved in this study could be adjusted based on the desired β for fitting incremental new features without being retrained via huge training features.
• Limitations: 1 This methodology was impossible to diagnose the sounds when CS 1 and CS 2 cannot be segmented and extracted via the STMHT method for a given heart sound such as that plotted in Fig. 10; 2 The proposed classifier might not be satisfied with the compound heart diseases due to the distribution of features extracted from which can not fit a single Gaussian distribution.

Future study
Future study focused on how to handle the sounds (such as some AR sounds) when CS 1 and CS 2 cannot be segmented and extracted via the STMHT method will be explored, and on how to build the classifier model for fitting the compound heart diseases will be further studied. www.nature.com/scientificreports/