Introduction

The variations in R-R intervals are called heart rate variability (HRV), which is usually served as an index of the autonomic nervous system activities. Many applications have been introduced to analyze the heart signal in medicine. HRV analysis not only has received much attention in detection, prediction, classification, or even treatment of cardiovascular diseases but also for the understanding of the psychological disorders and states [1,2,3]. To address this goal, several computer-aided algorithms recruited for offline/online monitoring of HRV. Generally, in the design of a typical HRV monitoring procedure, several components may be incorporated, including data acquisition step, pre-processing the data, feature extraction algorithms, feature reduction, and classification (pattern classification or recognition) modules. However, it is noted that except for the data acquisition step, a scheme may comprise of one or more component, but not necessarily all.

Depending on the utilization, different criteria are considered in designing algorithms. For instance, in offline computations, usually a high precision algorithm is contemplated, and in others, specifically in online applications, benchmarks also focus on the computational speed. In some literature, more attention has been placed on the assumption of the non-stationarity of the bio-signals [4, 5]. This category of research highlights the use of nonlinear techniques because it is believed that using traditional linear approaches may fail in demonstrating the important info. To date, several nonlinear indices have been introduced, some inspired by chaos theory or predictability of the signal, and the others based on the statistical methodologies. Correntropy (corrEn) was recently introduced [6] as a new nonlinear index to assess the similarity of a time-series. This approach integrates time structure and statistical distribution of the signal. Cauchy-Schwarz divergence (CSD) is another similarity index [7] which quantifies the difference between the information content of the data. The commonality of these two algorithms (corrEn and CSD) is that both utilize information theoretic descriptors. Usually, a kernel-based approach is applied to both measures. It is used to handle the harmful effects of the outliers and improve the accuracy. Eliminating the outliers and applying the useful data, enables a faster convergence.

Recently, meditation attracted the scientific attention of researchers extensively. Therefore, physiological effects of meditation techniques on the circulatory system have been scrutinized using HRV signals. Earlier, HRV dynamics during meditation were explored using nonlinear features, including Poincare plots [8, 9], fractal scaling [10], multi-fractal analysis [11], dynamical complexity [12], recurrence plot analysis [13], Hilbert transform [14], higher order spectra [15], Lyapunov exponents [16, 17], and some entropy measures [16, 18]. Though, there is not any published article, exploring the differences in HRV fluctuations similarity in the normal state and meditation practices.

In this paper, two similarity indices were inspected to examine the resemblance of the HRV signal in two different meditation techniques. One of them utilizes a probability density function (PDF) and the other applies a nonlinear approach. The former is known as CSD and the latter is recognized as “corrEn”. Since the measures are strongly dependent on the kernel bandwidth, the role of choosing kernel sizes was also evaluated in this study. In addition, the proficiency of each similarity index in the HRV classification is appraised. We also examine the ability of feature level fusion in classification performances. To this end, three fusion rules, including division, product, and weighted sum rules are proposed. For the first time, we propose a weighted sum rule, which recruits the p-values of the statistical test to define the weights.

Material and methods

HRV recordings during spontaneous normal breathing (SNB), and pre/during the meditation practices, including Chinese Chi meditation (CCM) and Kundalini Yoga meditation (KYM) available at the Physionet database were studied [14]. Two similarity indices were extracted to characterize HRV signals (Feature Extraction). A novel feature level fusion approach was introduced and the features combined using three different fusion rules. The normalized combined/non-combined features were input the classifier to separate psychological states. The effect of parameterization of the features and the classifier was considered. The total procedure is diagrammed in Fig. 1.

Fig. 1
figure 1

The proposed methodology

Data selection

We studied the HRV signals of healthy meditators and non-meditators available in Physionet database [14, 19]. The meditation techniques comprise KYM (as trained by Yogi Bhajan) and CCM.

Wearing a Holter, the electrocardiogram (ECG) signal recordings of four well qualified Kundalini yoga performing group were obtained for about one and a half hours. A 15 min ECG signal was recorded primarily as pre KYM (pKYM). Then, successive breathing and chanting exercises were done during the Kundalini yoga practice (dKYM), while participants sit in a cross-legged posture.

HRV recordings of CCM were accessible in two states pre and during the CCM performances (pCCM and dCCM). Most of the participants were skilled in meditation and having started the CCM for about one to three months before the trial. Wearing a Holter monitor, each of participants done one hour of CCM. Sitting and listening to the taped instructions of the master, the volunteers breathe spontaneously while imagining the opening and closing of a perfect lotus in their stomach.

HRV signals of non-mediating control group accessible in Physionet database [14, 19] was employed. The participants of this group comprise of 11 healthy subjects which breathe spontaneously during sleep hours. The general health level of the groups was comparable [14]. The sampling rate was fixed at 128 Hz.

Participant information is summarized in Table 1.

Table 1 Subject characteristics in groups of meditators and non-meditators

Feature extraction

Correntropy

A nonlinear mapping of the signal to the kernel space provides a similarity parameter that is called corrEn [20]. Applying corrEn, the data is first transformed into a high-dimensional reproducing kernel Hilbert space and then the “conventional” correlation is computed. This feature takes advantage of the statistical distribution and the time structure of the data, simultaneously. Precisely, corrEn is capable of preserving nonlinear specifications and higher order data moments [21]. Additionally, it is robust in dealing with impulsive noise and its computational complexity is low [22]. These benefits make it an appropriate signal processing technique for characterizing nonlinear dynamics [23]. Previously, this method has been successfully used as a nonlinear method for analyzing bio-signals [24, 25]. It was shown that corrEn is linked with the regularity of HR signals during sleep disturbances [25].

Considering two time-series X ϵ RM×N; X=[x1, x2, Λ, x N ] and Y ϵ RM×N; Y=[y1, y2, Λ, y N ]. M denotes the dimension and N represents the sample number. CorrEnt is defined as Eq. (1):

$$ V\left(X,Y\right)=E\left[<\Phi (X),\Phi (Y)>\right]=E\left[{\upkappa}_{\sigma}\left(X,Y\right)\right] $$
(1)

where a radial kernel function is shown by κ σ , in which σ is a kernel size (bandwidth). A nonlinear mapping is introduced by Φ, which maps data to a high dimensional kernel Hilbert space. E represents the mean operator and <∙,∙> is the inner product. As a result, the corrEn can be rewritten as follows:

$$ V\left(X,Y\right)=\frac{1}{N}{\sum}_{i=1}^N{\upkappa}_{\sigma}\left({x}_i,{y}_i\right) $$
(2)

The most common kernel function in corrEn is the Gaussian kernel, which is formulated as (3):

$$ {\upkappa}_{\sigma}\left({x}_i,{y}_i\right)=\exp \left(\frac{{\left\Vert {x}_i-{y}_i\right\Vert}^2}{2{\sigma}^2}\right) $$
(3)

where ‖⋅‖ denotes Euclidean norm.

In this study, the kernel size (k) was set in the range of 1 to 10 with the step size of 1; k = 1, 2, 3, …, 10.

The Cauchy-Schwarz divergence

Consider the probability density functions f(X) and g(Y) for two time-series X and Y. Basically, CSD is derived from the Cauchy-Schwarz inequality [26] for inner products and calculates the distance between the density functions. It also recruited as a similarity index. The Cauchy–Schwarz divergence is effortlessly computable. It is affine transformations invariant in terms of input data transformation [27]. Earlier, for examining the time series similarity, an algorithm was presented that used Cauchy–Schwarz divergence [28]. The algorithm was tested on various databases, including the heart signals of arrhythmia patients. The usefulness of the proposed algorithm in the databases with varying length was shown by its high speed and high accuracy.

Equation (4) shows the CSD formulization:

$$ CSD\left(f,g\right)=-\ln \frac{<f,g>}{\left\Vert f\right\Vert \left\Vert g\right\Vert } $$
(4)

Since the probability densities are in the range of zero and one, the logarithm argument is non-negative and its maximum value is 1. If f=g, then CSD = 0, else it is a positive value. A few problems occur with such an approach: (1) the signals are discrete, so the actual densities (f and g) is not clear. (2) The computational cost of statistical density estimators is very high because they require rather large sample sizes. To overcome these problems, usually, some kind of density estimation is performing [29].

In this study, the estimation of both corrEn and CSD was realized using incomplete Cholesky decomposition [30]. In addition, different kernel sizes (k) were evaluated (k was in the range of 1 to 10 with the step size of 1; k = 1, 2, 3, …, 10).

Feature level fusion

Feature level fusion approaches were adopted in this study. Consider a feature vector of A for corrEn measures and B for CSD. Three different fusion rules were examined as follows.

  1. 1-

    Product rule.

$$ \Pr \_f=\mathbf{A}\times \mathbf{B} $$
(5)
  1. 2-

    Division rule.

$$ Dr\_f=\mathbf{A}/\mathbf{B} $$
(6)
  1. 3-

    Weighted sum rule.

$$ Wsr\_f={\sum}_{i=1}^5{W}_i\mathbf{A}+{W}_i^{\hbox{'}}\mathbf{B} $$
(7)

where W denotes the weights and i = 1,2,..5 correspond to the five predefined classes (pCCM, dCCM, pKYM, dKYM, and SNB).

In weighted sum rule, the following assumption is adopted: the contribution of some features is more than the other measures. To address this problem, the indices were weighted regarding their significance in each class. This significance was defined based on the statistical p-values. If the corresponded p is lower than 1 × 10−4, then W=2. For 1 × 10−4 < p < 1 × 10−3, W=1.5; for 1 × 10−3 < p < 1 × 10−2, W=1; for 0.01 < p < 0.05, W=0.5; and for p≥0.05, W=0 were considered.

Figure 2 shows the three feature level fusion rules, schematically.

Fig. 2
figure 2

Feature level fusion rules (a) product; (b) division; and (c) weighted sum

Classification

Probabilistic neural network

The HRV classification was performed using probabilistic neural network (PNN) to separate SNB from each pCCM, dCCM, pKYM, and dKYM state. Before inputting the features to the PNN, they were normalized (Norm_F) as follows:

$$ Norm\_F=2\left(\frac{F-{F}_{\mathrm{min}}}{F_{\mathrm{max}}-{F}_{\mathrm{min}}}\right)-1 $$
(8)

The efficiency of PNN in biomedical pattern recognition and signal classification has been established in the previous literature [31]. The PNN classifier is allocated to the group of feed forward based networks which applies the radial basis function using the sigma adjustment values (σ). To better understand how this classifier works, Fig. 3 shows the PNN architecture, schematically.

Fig. 3
figure 3

The architecture of PNN

In this study, to discriminate between SNB and each pCCM, dCCM, pKYM, and dKYM group, a 5-fold cross-validation fashion was adopted. Randomly dividing data into 5 equal parts the cross-validation is performed, while 4 parts are allocated to the training and one for the test. Additionally, the performance of PNN was appraised for 20 different sigma values (in the range of 0.05 to 1 with the step size of 0.05; σ = 0.05, 0.1, 0.15, …, 1). To evaluate the classification performances, accuracy was calculated as Eq. (9):

$$ Acc=\frac{TP+ TN}{TP+ FP+ FN+ TN} $$
(9)

where TP, TN, FP, and FN denote true positives, true negatives, false positives, and false negatives, respectively.

K-nearest neighbor

K-nearest neighbor (kNN) is a supervised and nonparametric procedure. In this techniques, by computing Euclidean distance, the new sample query result is categorized based on the closeness of the k-nearest samples accessible in the feature space. Applying a short time for training, it results in a good performance [32, 33]. In this study, different k values (k1) were tested to evaluate the classification results (k1 was set in the range of 2 to 11 with the step size of 1; k1 = 2, 3, …, 11).

Results

Variation of mean corrEn values with varying kernel sizes were shown in Fig. 4 for HRV signals during different states.

Fig. 4
figure 4

Variations of corrEn in different states. X-axis shows the kernel bandwidth and y-axis depicts the corrEn values

As seen in Fig. 4, the lowest variations in the corrEn were observed for the large kernel sizes in all states. Considering the lower kernel sizes, the differences of corrEn values in different psychological states were more pronounced. For k = 1, the mean corrEn values were 0.9146, 0.7128, 0.6039, 0.5635, and 0.8679 for pCCM, dCCM, pKYM, dKYM, and SNB, respectively. The corresponding corrEn values were decreased to 0.1317, 0.067, 0.04, 0.0741, and 0.0801 for k = 10. Therefore, the lowest corrEn values were assigned to the HRV signals of KYM (both pKYM and dKYM) states.

Figure 5 shows variations of mean CSD values with varying kernel bandwidth in different states.

Fig. 5
figure 5

Variations of CSD in different states. X-axis shows the kernel bandwidth and y-axis depicts the CSD values

Adopting k = 1, for pCCM, dCCM, pKYM, dKYM, and SNB, the average CSD values were 2.47×10−5, 2.524×10−5, 6.418×10−4, 3.902×10−4, and 9.131×10−7, respectively; which decreased to 3.44×10−6, 4.72×10−6, 1.722×10−4, 9.52×10−5, 2.259×10−7, for k = 10. The largest CSD values were obtained for KYM states (pKYM and dKYM) and the minimum value was found for SNB.

Totally, the variations of corrEn and CSD across lower kernel values are larger than those across higher kernel sizes. Additionally, diverse similarity measures were attained for different psychological states.

The distribution of the features were evaluated and the median and statistical parameters of dispersion are shown in Fig. 6.

Fig. 6
figure 6

The percentiles of the features in different states. a corrEn and (b) CSD. X-axis shows the kernel bandwidth and y-axis depicts the feature values

Since the distribution of the features is not-normal (Fig. 6), the Wilcoxon ranksum test was used to compare two states for statistical differences. Table 2 lists the p-values.

Table 2 Statistical differences between the groups (* denotes p < 0.05, which shows significant difference)

Figure 7 summarizes the performance of the classifier using the corrEn similarity measure.

Fig. 7
figure 7figure 7

PNN classification accuracies using corrEn for different k and varying σ parameter. a top: pCCM vs. SNB, bottom: dCCM vs. SNB; (b) top: pKYM vs. SNB, bottom: dKYM vs. SNB; (c) top: pCCM vs. dCCM, bottom: pKYM vs. dKYM

In discriminating pCCM from SNB, the accuracy of 100% was achieved using k = 10 and σ = 0.05. Figure 7a shows that the average accuracy was maximum for σ = 0.05 and minimum for σ = 1. Discrimination between pCCM and SNB showed the highest average recognition rate of 85% for σ = 0.05, which dropped to 56% for σ = 1. The maximum average classification results of 72.81% was obtained for k = 10.

For k = 9 and k = 10 with σ = 0.05, the accuracy was 100% for dCCM vs. SNB classification. In this case, the highest average rate of 89.38% and the lowest mean rate of 55% were reached for σ = 0.05 and σ = 0.6, respectively. Additionally, the highest average recognition rate was 62.81% for k = 6.

Figure 7b shows the KYM vs. SNB classification results. The pKYM vs. SNB classification was performed with the highest rate of 100% for σ = 0.05 and k = 1,2,3, and 4. In this case, the maximum correct rate (90.83%) and minimum correct rate (66.67%) were achieved for σ = 0.05 and σ = 0.55 to 1, respectively. In addition, the maximum average accuracy (72.92%) was obtained for k = 6.

Figure 7c shows the classification results of two classes (pCCM vs. dCCM and pKYM vs. dKYM). For pCCM and dCCM classification, the highest rate of 100% was obtained for σ = 0.05 and k = 7–9. The maximum average rates were 93.85% for σ = 0.05 and 76.92% for k = 1 and k = 2.

Compared to the other states, higher recognition rates were achieved for pKYM and dKYM classification. For σ = 0.05 and k = 1,2,5,6,7,8,9,10; for σ = 0.1 and k = 1,2,6,7,8,9,10; for σ = 0.15 and k = 1,2,7,8,9,10; for σ = 0.2 and k = 2,8,9,10; and for σ = 0.25 and k = 10, the accuracy was 100%. In addition, the average maximum correct rates were 95.71% for σ = 0.05 and 82.86% for k = 10.

The performances of the CSD similarity index for classifying different states are shown in Fig. 8.

Fig. 8
figure 8figure 8

PNN classification accuracy using CSD for different k and varying σ parameter. a top: pCCM vs. SNB, bottom: dCCM vs. SNB; (b) top: pKYM vs. SNB, bottom: dKYM vs. SNB; (c) top: pCCM vs. dCCM, bottom: pKYM vs. dKYM

Figure 8a shows the classification results of CCM vs SNB; the top frame illustrates the pCCM vs. SNB and the bottom displays the dCCM vs. SNB. For the former, the highest rate of 100% was achieved for σ = 0.05 and k = 1. In this case, the maximum average accuracies were 90.63% for σ = 0.05 and 80.94% for k = 6, 7, 8. For the latter, the recognition rate of 100% was obtained for σ = 0.05, 0.1, 0.15, 0.2, 0.25, 0.3 and k = 1, for σ = 0.05, 0.1, 0.15 and k = 2, and for σ = 0.05 and k = 3. In this case, the highest average rates of 95.63 and 85.63% were obtained for σ = 0.05 and k = 1, respectively.

The KYM vs. SNB classification results are shown in Fig. 8b; the top frame illustrates the pKYM vs. SNB and the bottom presents the dKYM vs. SNB. For pKYM vs. SNB, the maximum average rates were accomplished for σ = 0.05 and k = 1 with the rates of 87.5 and 75%, respectively. However, the accuracy of 100% was attained using σ = 0.05 and k = 1. For dKYM vs. SNB, the average classification accuracies have increased sharply. The mean recognition rate of 100% was obtained for σ = 0.05 and σ = 0.1. Considering kernel sizes, the highest average rate of 84.58% was accomplished for k = 1. In addition, for all sigma values and k = 1 and k = 2, the accuracy was 100%.

For pCCM vs. dCCM classification (Fig. 8c, top frame), the highest mean accuracies were 93.08 and 73.08% for σ = 0.05 and k = 8, respectively. However, the recognition rates were 100% for σ = 0.05 and k = 2, 3, 4. For pKYM vs. dKYM classification (Fig. 8c, bottom frame), the average classification accuracies were maximum for σ = 0.05 (85.71%) and k = 1 and k = 2 (69.29%). However, the recognition rate was 85.71% for σ = 0.05 and all kernel sizes.

The feature level fusion was performed using three fusion rules. To simplify, we only reported the maximum accuracy and the parameters for which the maximum accuracy was obtained in Table 3. For comparison, the classification results of any non-fusion feature are also summarized in Table 3.

Table 3 The highest accuracy of the combined and non-combined features in classification of SNB and each psychological state using PNN

The results showed that two fusion approaches, including weighted sum and division rules, outperformed the other schemes. For these two fusion methodologies, a greater number of selected parameters have resulted in the accuracy of 100%. However, regarding the maximum accuracy of the classification, the product rule resulted in a lower accuracy rate than the other fusion and non-fusion strategies. Additionally, the results showed that discrimination of two classes of dKYM and dCCM performed better than other classes. Exactly, in the most cases, the highest accuracy was obtained. According to the classification results, the best values for σ and k are 0.05 and 1, respectively.

The results of the data classification using kNN are given in Table 4.

Table 4 The highest accuracy of the combined and non-combined features in classification of SNB and each psychological state using kNN

The results showed that applying division rule as a fusion approach, the accuracy of 100% was achieved for discrimination of all states. The second best results were obtained with the other two fusion rules. In these cases, the maximum accuracy of 100% was found for discriminating all classes, except for pCCM. Regarding the maximum accuracy, a lower accuracy rate was gotten for corrEn. Moreover, the kNN results revealed that dKYM and pKYM classes were classified with higher recognition rates, compared with other classes. According to Table 4, the best value for k was 5.

Comparing the performance of two classifiers (kNN and PNN), it can be concluded that:

  • Better classification performances were achieved using PNN.

  • In terms of classification accuracy, for both classifiers (PNN and kNN), division rule outperformed the other strategies, in which the maximum accuracy of 100% was achieved for classifying all states.

  • For both classifiers, the best classification results were achieved for dKYM.

Discussions

In this paper, a comparison between two information theoretic similarity indices (CSD and corrEn) was done to classify HRV signals. In addition, three feature level fusion approaches were examined. To this effect, the product rule, division rule, and weighted sum rule were evaluated. An innovative approach was introduced to define the weights of each feature in the weighted sum fusion rule. The discriminative ability of the features was determined using the p-values of the statistical test. The system performances were evaluated by changing the kernel size of the features and adjustable parameter of the classifiers (sigma for PNN and k1 for kNN).

It has previously been shown that HRV characteristics are affected by meditation. Li et al. [12] studied the HRV complexity in CCM and KYM groups. They concluded that the dynamical complexity of HRV declines during meditation. Song et al. [11] showed more HRV regularities and lower degree of multifractalities during CCM. Analyzing recurrence plots confirmed that the nonlinear HRV interactions were dropped during meditation [13].

Our results are consistent with the previous findings. It has shown that the similarity measures of HRV signals were affected by the psychological state. The results showed that the lowest corrEn values were achieved for the HRV signals of pKYM and dKYM states. The lower corrEn might be attributed to the lower stress levels and lower sympathetic reactions in the dKYM. In contrast, the highest corrEn has belonged to the pCCM and SNB. The highest CSD was attained for pKYM and the lowest was obtained for the SNB. As the kernel size increases, the mean similarity measures decrease, as well as their variations.

The critical role of parameter selection in classification performances has been also shown. Both kernel size of the features and sigma/k1 parameters affected the classification accuracies. In addition, our results showed the benefit of feature level fusion strategies in HRV classification. Previously, the role of feature level fusion in increasing the performance of the classification of psychological data has been shown [34, 35].

By combining the similarity indices derived from corrEn and CSD, valuable information of HRV signals is achieved which led to superior classification results. The CSD was unable to show the nonlinear similarity of the signals, which is accessible with corrEn. Consequently, the information of these two features is complimentary. Although the high classification performances (100%) were achieved by each feature, fusion strategies (especially division rule) obtained a higher number of maximum accuracies (Tables 3 and 4). Totally, the best results were obtained using PNN.

The classification of HRV signals during mediation has not been documented sufficiently. Previously, a system was proposed to classify HRV signals of Samadhi and non-Samadhi groups based on time and frequency features [36]. The accuracy of 94.8% was attained using Fisher discriminant analysis. In another study, Lyapunov exponent and entropy were calculated to characterize HRV dynamics during CCM and pCCM [16]. Three machine learning systems were evaluated, including Quadratic, fisher, and kNN. Quadratic classifier achieved the maximum accuracy of 92.31%.

To sum up, the results of this study established that new combined similarity indices of HRV signals could be served as an appropriate quantity to correctly discriminate different psychological states.

One of the limitations of this study is the number HRV signals for evaluating the proposed algorithm. It is suggested that the framework be assessed on a big data in the future. In addition, the number of signals in different categories is not the same in the existing database. This imbalance classes can affect classifier recognition rates. In the future, the class imbalance problem should be taken into account.

Conclusion

Classification of HRV signals in different psychological states has recently become a challenging topic. In this study, we attempted to characterize the HRV signals in different states, including pCCM, dCCM, pKYM, dKYM, and SNB. To address this issue, two features were extracted which quantified the similarity of the time-series, known as CSD and corrEn. In addition, a novel feature level fusion approach was presented based on the p-values of the similarity indices. The experimental results on the two forms of meditation (KYM and CCM) confirmed the proficiency of the proposed feature level fusion strategy for classifying HRV in the psychological states. Specifically, the results suggested that combination of CSD and corrEn information of the HRV signals based on weighted sum and division rules can improve the accuracy of the classifiers. In addition, the role of parameter selection on classification performances has been shown. The maximum accuracy of 100% was achieved.