Introduction

Brain connectivity is a complementary aspect covering three different but interrelated issues such as structural, functional and effective connectivity [9]. Functional connectivity is a statistical concept which can quantify temporal dependency of neuronal activation patterns of morphologically and physiologically distinct brain regions by using statistical approaches such as Mutual Information (MI), Pearson correlation coefficient (PCC), spectral coherence estimation and, cross-correlation [9]. Statistical dependencies fluctuate on multiple time scales ranging from milliseconds to seconds. In the present study, these four methods were examined to observe the difference between patients with psycho-physiological insomnia (PPI) and controls by means of EEG synchronization in night sleep.

EEG synchronization is a hypothetical mechanism of functional connectivity originated from the information transmission in nervous systems [10]. Regarding as several studies, EEG synchronization alters in Alzheimer’s disease [16] and seizure [1] with respect to coherence estimations. However, the capability of coherence was found to be highly dependent on wakefulness [14, 29], reference arrangement [15], and experimental paradigm [20]. Therefore, the MI has been proposed as a better alternative to coherence, to measure both linear and nonlinear statistical dependencies between two time series [3]. Therefore, MI has frequently been applied to EEG series to understand the information transmission between particular brain regions in different physiological conditions such as waking and sleep [30], as well as cognitive tasks [13, 17].

MI was also applied to multichannel EEG series to detect some neurological disorders such as Alzheimer’s disease [12] and schizophrenia in past [19]. In the present study, the models obtained through various classification approaches were examined to compare linear and nonlinear connectivity approaches in detecting PPI regarding as all epochs in each particular sleep state (stage.1-2-3-4, wake, REM). Rule, naive Bayes, nearest neighbours, tree, radial basis function network, regression, and support vectors based classifiers were used as classification methods of data mining. Various classifiers based on these methodologies were implemented in Waikato Environment for Knowledge Analysis (WEKA) [8]. These classifiers are supervised learning techniques and needs a training data set to learn the behaviour of the system under consideration. To this end, the data was divided into two parts; training data and testing data. The mentioned data mining techniques were used to construct a model using the training data set. Testing data set was used to measure the performance of the obtained model through each classifier and the performance of each classifier in terms of accuracy, sensitivity, specificity, and precision were evaluated through the elements of the confusion matrix that are true positive, true negative, false positive, and false negative [27]. The root mean squared error (RMSE) measure was also used to examine the accuracy of the obtained models.

Materials and methods

Data collection

Experimental sleep EEG series were collected from volunteers by using a digital polysomnography (Somno Star Alpha Series-4, Sensor Media Corporation, Yorba Linda,CA) at Department of Psychiatry, Sleep Research Center in Gülhane Military Medical Academy. The volunteers did not drink any caffeine within the time period of two days (both before the adaptation night sleep and the voluntary night sleep following the adaptation). The second night measurements (after an adaptation sleep) were analyzed in this study. During experiments, sound was attenuated to set the noise level approximately to 30 dB SPL in a light controlled laboratory. According to the international 10–20 electrode system, six derivations of EEG originated from frontal (F3,F4), central (C3,C4) and occipital (O1,O2) regions of the brain were obtained. The reference electrode was the contra lateral mastoid. Since,the estimation of hemispheric cortical connectivity measures from EEG signals is the bias introduced by effects of the reference electrode in recording procedure [26], the mastoids have been commonly followed in sleep studies [22].

The sampling frequency of the signals was 256 Hz. The time interval of each epoch is assigned as 30 s. As stated in basic works, sleep EEG series used for recognition of sleep stages are clearly visualized on central derivations such as C3−A2 and C4−A1 [2]. Therefore, these two central derivations were analyzed in the present study. Sleep EEG measurements were acquired at 256 Hz and filtered by using both a wide band analog filter (0.001–70 Hz) and a band-pass filter (0.1–50 Hz). Sleep EEG series were visually scored by experts according to the criteria of Rechtschaffen and Kales [23] in to REM sleep (wake and REM) and non-REM sleep (stage1–4). In literature, several classification algorithms consisting of multi layer perceptrons [11] and artificial neural networks [24], [28] were proposed in scoring sleep recordings regarding as mean frequency and amplitude of EEG series in addition correlation coefficients [11], wavelet coefficients [24] and principle components [28]. Sleep stage classification algorithms consist of feature extraction and then classification. Therefore, both identification method and classification approach should be useful to identify any specified stage in sleep. These classification methods were compared to each other with respect to computation times and accuracy rates for automated scoring of sleep stages identified by several features in both time and frequency domain as well as statistical domain in reference [5]. In a future work, wide range of not only feature extraction but also classification methods could be investigated in detecting each particular sleep stage scored by experts.

The duration of each epoch was 30 s. Experiments were started at 10:00 p.m. and finished at 7:00 a.m. the next day. The transitions and relative amount of time spent in each sleep stage in each individual experimental recording were given in Table 1. Total Sleep Time (TST) was defined as the amount of time between Sleep Start and End scored as ‘sleep’ in hour (h).

Table 1 Distribution of sleep stages (stg.) in the night sleep for patients (P.) and controls (C.)

All data were stored on a hard disk in European data format. Both a wide band analog filter (0.001–70 Hz) and a band-pass filter (0.1–50 Hz) were used to filter the measurements. Sleep EEG data were collected from 14 volunteers (7 patients and 7 controls). The mean age of participants was 40 years. None of volunteer has sleep apnea, respiratory disorders and myoclonic activity. Patients are asked to estimate their total subjective sleep time, which is later divided by the PSG sleep to compute the subjective sleep ratio. International Classification of Sleep Disorders (ICSD-2), (the essential features of PPI are overdone arousal (physiological, cognitive, or emotional)) was followed in diagnose as stated in reference [25].

Functional brain connectivity measurements

Considering two random variables denoted by X=x 1,x 2,…,x N and Y=y 1,y 2, …,y N , the expected uncertainty in each of them can be estimated in computing probability distribution (p.d.) dependent entropy as follows

$$\begin{array}{@{}rcl@{}} H(X)&=&-{\sum}_{x}p(x)\log(p(x)),\\ H(Y)&=&-{\sum}_{y}p(y)\log(p(y)) \end{array} $$
(1)

Here, p(x) and p(y) denote the p.d. of X and Y, respectively. The JE of X and Y is defined by

$$ H(X,Y)=-{\sum}_{x,y}p(x,y)\log(p(x,y)) $$
(2)

JE refers the uncertainty of a joint event is less than or equal to the sum of the individual uncertainties, equal if X and Y are independent. The MI derived from information theory can be computed by using the formula in form,

$$ I(X,Y)=H(X)+H(Y)-H(X,Y)\geq 0 $$
(3)

to obtain the information for Y knowing X or vice versa. It is also well known that MI can never be larger than any of the individual entropies such that I(X,Y)≤ min(H(X),H(Y)) where MI satisfies I(X,Y)=I(Y,X)≥0. The MI is not restricted to linear dependencies and is able to quantify the possible functional and nonlinear relationship between X and Y. To quantify how X and Y track each other, a linear statistical measurement so called PCC has been presented in form,

$$ C_{X,Y}=\frac{1}{N} {\sum}_{k=1}^{N}\frac{(x_{k}-\mu_{x})(x_{k}-\mu_{x})}{\sigma_{x}\sigma_{y}} $$
(4)

where μ . and σ . denote the mean value and standard deviation of time series, respectively [21]. In contrast to MI, PCC is restricted to linear dependencies. The extension of PCC from time domain to frequency domain coherence estimation has been introduced by,

$$ Coherence(f)=\frac{\vert P_{XY}(f)\vert^{2}}{\sqrt{P_{X}(f)P_{Y}(f)}} $$
(5)

where P X Y (f), P X (f) and P Y (f) denote cross power spectral density between X and Y, power spectral density of X and Y, respectively. Here, f is frequency. If X and Y are not correlated with constant phase shifts, coherence becomes 0. Contrary, if there is maximum linear interdependence between them, coherence becomes 1 [21]. Traditionally, Welch method have been frequently used to obtain the power spectral density estimations in (5) [31]. In the present study, Burg method was also used to in computing coherence value.

For those independent time series denoted by X and Y, it is possible to calculate the distribution of the relative phase in form ϕ x y (t)=ϕ x (t)−ϕ y (t) within a given time window such as single epoch of 30 s. The mean phase coherence was considered in this study given by

$$ \rho=|\langle e^{i\phi_{xy}(t)} \rangle_{t} | $$
(6)

as stated in reference [18].

Data preparation

After application of entropy based brain connectivity measurements to sleep EEG series recorded from patients and controls, the feature sets were re-organized and modelled to be used in detecting PPI. In modelling, supervised learning techniques were used as data mining techniques which are about learning the case from a training data set of correctly identified observations. There are 14 observations including both patients and controls where 7 of them are patients and the rest are controls. As it is seen in Table 1, some sleep stages did not exist during the night sleep of volunteers. This results in missing values for modelling. Missing values have a significant effect on the modelling performance. One way to avoid this undesired situation is to compute the arithmetic mean of the values observed for that variable and insert the mean as a constant value into the missing part which has the less variability in the presentation. Hence, the missing parts occurring in the data set of this study were filled by the corresponding mean value.

Variables of this experiment are dependent and independent variables which are corresponding to outcomes and features respectively. There are two categories for the dependent variable of the model. The possible outcomes of the model are patient and control. The zero value was assigned to controls while the patients were represented by the value, 1 in the modelling process which is corresponding to binary classification.

The sleep stages are the independent variables (explanatory variables, parameters, features) of the targeted model. There are 6 sleep stages, that is, there are 6 features in the considered case. The synchronized data set in each sleep stage has a vectorial form. The classification techniques used in this study need real-valued scalars as the parameter values. In this sense, instead of this vectorial form, a corresponding scalar value as the size (length) was obtained through 2-norm which is also called vector norm and given in the following form.

$$ \vert\vert \mathbf{x}\vert\vert_{2}=\sqrt{{x_{1}^{2}}+{x_{2}^{2}}+{\cdots} +{x_{n}^{2}}},\quad where\quad \mathbf{x}=\left[\begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_{n} \end{array}\right] $$
(7)

Data mining classification methods

This study aims to detect the psychophysiological insomnia through first learning the case using supervised learning techniques and then making a prediction for a new case. This process stands for a binary classification in which we have the outputs 0 and 1 and is executed through standard data mining techniques. Some of these techniques used in this study can be classified as bayesian networks (NaiveBayes), hybrid methods (DTNB), rule based methods (Ridor, DecisionTable), nearest neighbour based methods (IB1, IBk, NNge, LWL), instance based methods (KStar), decision tree based methods (RandomForest, ADTree, NBTree, RandomSubSpace, RandomTree, J48, RotationForest), neural networks (RBFNetwork, MultilayerPerceptron), regression methods (ClassificationViaRegression, Logistic, SimpleLogistic), optimization algorithms (SMO), ensemble algorithms (AdaBoostM1), and voting algorithms (VFI). These are the methods having the best results in predicting the psychophysiological insomnia.

NaiveBayes is a probabilistic classifier that applies Bayes theorem. DTNB is a hybrid method based on building a decision table and using naive bayes. Ridor is ripple-down rule learner method. DecisionTable is based on constructing a simple decision table. IB1 is a nearest neighbours classifier while IBk is a k-nearest neighbours classifier. NNge is a nearest-neighbor-like algorithm based on non-nested generalized exemplars. LWL is a locally weighted learning technique that uses an instance-based algorithm to compute and assign instance weights. KStar is an instance-based classifier in which the class of training instances similar to the test instance are used to identify the test case’s class. Random Forest is a learning method that uses decision trees. ADTree generalizes decision trees for classification. NBTree generates a decision tree with naive Bayes classifiers at the leaves. RandomSubSpace is a method which constructs a decision tree based classifier for classification. RandomTree is a tree based algorithm works through a specific number of randomly chosen attributes at each node. J48 is a method that generates a pruned or unpruned C4.5 decision tree. RotationForest does classification and regression depending on the base learner. RBFNetwork is a method that implements a normalized Gaussian radial basis function network using the k-means clustering algorithm. MultilayerPerceptron is a multilayer neural network classifier. ClassificationViaRegression uses regression methods and builds a regression model for each class value. Logistic is a method that builds and uses a multinomial logistic regression model with a ridge estimator. SimpleLogistic is a classifier for building linear logistic regression models. SMO is method which uses the John Platt’s sequential minimal optimization algorithm to train a support vector classifier. AdaBoostM1 is a method that boosts a nominal class classifier. VFI is a method that votes feature intervals for classification [6, 8].

Performance evaluation techniques

To measure the performance of the considered data mining techniques in predicting psychophysiological insomnia, the statistical measures of binary classification were used. These measures are accuracy, root mean squared error (RMSE), sensitivity, specificity, and precision. To compute these measures except RMSE, there are four basic data about the results of the predictions in a binary classification problem. They are true positive (TP), true negative (TN), false positive (FP), and false negative (FN). True positive value is the number of correctly classified positive examples. True negative value is the number of correctly classified negative examples. False positive value is the number of incorrectly classified negative examples and false negative value is the number of incorrectly classified positive examples.

Accuracy presents systematic errors while precision stands for random errors. Accuracy measures the proportion of correctly identified instances. Precision measures the consistency of the model through several predictions. Sensitivity is the percentage of correctly identified actual positives while specificity is the proportion of correctly identified negatives. The corresponding metrics of these measure are defined as follows

$$\begin{array}{@{}rcl@{}} Accuracy=\frac{TP+TN}{n},&\quad& Sensitivity=\frac{TP}{TP+FN},\\ Specificity=\frac{TN}{TN+FP},&\quad& Precision=\frac{TP}{TP+FP} \\ \end{array} $$
(8)

where n is the total number of testing nodes. These measures are obtained as a percentage and the closer the value to 100 % the greater the performance the method has. RMSE measures the differences between predicted values and the observed values. The following relation is used for evaluating RMSE.

$$ RMSE=\sqrt{\frac{1}{n}\sum\limits_{i=1}^{n}\left(y_{i}-\widehat{y}_{i}\right)^{2}} $$
(9)

where n, y i and \(\widehat {y}_{i}\) stand for the total number of testing nodes, the observed class and the predicted class of the testing nodes respectively. The closer the RMSE value to 0.0 the greater the performance obtained in modelling.

Results

Four approaches were calculated for each epoch in both patients and controls. Then, the average values of estimations were computed for each particular sleep state for each group. The error bars composed mean values of MI and PCC were shown in Figs. 1 and 2, respectively. It can be clearly seen that any individual error bar of controls did not almost coincide with the bar of patients in any sleep period for both estimations.

Fig. 1
figure 1

Error bars with means and standard deviations of MI values for both controls (in gray) and patients (in black)

Fig. 2
figure 2

Error bars with means and standard deviations of PCC for both controls (in gray) and patients (in black)

The error bars consisting of average values of coherence estimations (with Welch method) for controls and patients were shown in Fig. 3. As seen from this figure, individual error bar of coherence estimations of patients in each particular sleep stage were smaller than that of controls.

Fig. 3
figure 3

Error bars with means and standard deviations of coherence values for both controls (in gray) and patients (in black)

In Fig. 4, the tuple (I(X,Y),C X,Y ) was shown where each dot corresponds to this tuple. In accordance with literature, the correlation between MI and PCC was found to be positive and nonlinear. In particular, the inter relationship between MI and PCC of REM sleep was different from the that of non-REM sleep in each group.

Fig. 4
figure 4

A comparison between MI and PCC estimations for all sleep stages in controls (in black) and patients (in blue)

The results of the performance evaluations for several data mining techniques were given in the related tables. The classification methods were sorted by first accuracy value then RMSE. The classifier with the highest accuracy value was located as the best method. When the accuracy values of different classifiers were same then the place of the method having the lowest RMSE comes first. The 100 % accuracy value shows that the method can classify all the cases correctly. In this sense, Table 2 shows that MI estimations of patients are exactly different from that of controls. All individuals were classified correctly with 10 classifiers. In comparing Tables 3 and 4, coherence can also provide error free classification when the Welch method was used to compute power spectral estimations of sleep stages. If the Burg method was used instead of Welch method, only one individual was not allocated correctly.

Table 2 Testing results for the method of MI in predicting PP
Table 3 Testing results for the method of Coherence (with Welch method) in predicting PPI
Table 4 Testing results for the method of Coherence (with Burg method) in predicting PPI

Regarding as Table 5, any classification approach did not provide the error free classification with respect to estimations of PCC. In particular, one individual was misclassified in all classifiers.

Table 5 Testing results for the method of PCC in predicting PPI

In case of mean phase estimations, the number of people classified fail was increased as seen from Table 6.

Table 6 Testing results for the approach of mean phase coherence in predicting PPI

Discussion and conclusion

In the present study, four hemispheric connectivity measurements were examined to obtain the electrophysiological arousals on sleep EEG epoches recorded from healthy controls and patients with PPI. All individuals can be classified correctly by using any data mining classifier for both entropy based MI estimations and spectral connectivity measurement so called coherence created by Welch’ method. When the Burg method was performed to compute the power spectral density estimation of sleep EEG epoch in estimating coherence, error free classification can be obtained by using only three classifiers (RBFNetwork, NNge, SMO). Regarding as PCC estimations, one person was misclassified in all classifiers. Concerning phase coherence estimations, one or two individuals were always misclassified.

In particular, lower interhemispheric coherence and lower MI estimations as well as higher PCC values were provided by patients in comparison to controls. In fact, only linear relations between particular hemispheric locations could be observed by using coherence, whereas the MI can measure both linear and nonlinear statistical dependencies of hemispheres in time domain. The results support that the cortex becomes more inactive as the sleep stage goes through from one stage to the next one in non REM sleep periods (stage.1–4), however, the cortex becomes much more active. It means that more neurons will be active in processing the information transmission during REM sleep in REM sleep periods. The higher order statistics of time series can be represented by nonlinear approaches, regarding as the information theory [7]. Therefore, the MI provided the most useful estimations.

The MI can give information in the context of functional connectivity such that its value highly depends on the accuracy of estimated JE derived from probability distribution. The results revealed that temporal dependency of cerebral hemispheres by means of MI can provide a very efficient tool for detection of PPI from sleep EEG recordings. The MI is a measure of statistical dependence between two random time series without making any assumption on the nature of these signals. Since, the duration of each single epoch was long enough, MI estimations gave stable estimates. Another factor making the MI be successful in detecting hemispheric functional changes between controls and PPI is that sleep EEG series are narrow band signals as stated in reference [4].

In the further study, the relationship between sleep stages and information transmission of multi-channel EEG measurements in controls will be investigated. Additionally, MI will be used to analyze sleep EEG series in detecting the effects of mood disorder depending on functional disorganization of the brain.