  Objective: This paper considers challenges in developing algorithms for
accurate segmentation and classification of heart sound (HS) signals. Methods:
We propose an approach based on Markov switching autoregressive model (MSAR) to
segmenting the HS into four fundamental components each with distinct
second-order structure. The identified boundaries are then utilized for
automated classification of pathological HS using the continuous density hidden
Markov model (CD-HMM). The MSAR formulated in a state-space form is able to
capture simultaneously both the continuous hidden dynamics in HS, and the
regime switching in the dynamics using a discrete Markov chain. This overcomes
the limitation of HMM which uses a single-layer of discrete states. We
introduce three schemes for model estimation: (1.) switching Kalman filter
(SKF); (2.) refined SKF; (3.) fusion of SKF and the duration-dependent Viterbi
algorithm (SKF-Viterbi). Results: The proposed methods are evaluated on
Physionet/CinC Challenge 2016 database. The SKF-Viterbi significantly
outperforms SKF by improvement of segmentation accuracy from 71% to 84.2%. The
use of CD-HMM as a classifier and Mel-frequency cepstral coefficients (MFCCs)
as features can characterize not only the normal and abnormal morphologies of
HS signals but also morphologies considered as unclassifiable (denoted as
X-Factor). It gives classification rates with best gross F1 score of 90.19
(without X-Factor) and 82.7 (with X-Factor) for abnormal beats. Conclusion: The
proposed MSAR approach for automatic localization and detection of pathological
HS shows a noticeable performance on large HS dataset. Significance: It has
potential applications in heart monitoring systems to assist cardiologists for
pre-screening of heart pathologies.

Signal Processing;Machine Learning;Applications