Browse Subject Areas

Click through the PLOS taxonomy to find articles in your field.

For more information about PLOS Subject Areas, click here.

  • Loading metrics

Visual Interpretation of Biomedical Time Series Using Parzen Window-Based Density-Amplitude Domain Transformation

Visual Interpretation of Biomedical Time Series Using Parzen Window-Based Density-Amplitude Domain Transformation

  • Selahaddin Batuhan Akben, 
  • Ahmet Alkan


This study proposes a new method suitable for the visual analysis of biomedical time series that is based on the examination of biomedical signals in the density-amplitude domain. Toward this goal, we employed two publicly available datasets. In the first stage of the study, density coefficients were computed separately by using the Parzen Windowing method for each class of raw attribute data. Then, differences between classes were determined visually by using density coefficients and their related amplitudes. Visual interpretation of the processed data gave more successful classification results compared with the raw data in the first stage. Next the density-amplitude representations of the raw data were classified using classifiers (SVM, KNN and Naïve Bayes). The raw data (time-amplitude) and their frequency-amplitude representation were also classified using the same classification methods. The statistical results showed that the proposed method based on the density-amplitude representation increases the classification success up to 55% compared with methods using the time-amplitude domain and up to 75% compared with methods based on the frequency-amplitude domain. Finally, we have highlighted several statistical analysis suggestions as a result of the density-amplitude representation.


The diagnosis of related diseases is dependent on the visual differences between the signals obtained from healthy and unhealthy subjects. However, biomedical signals are generally obtained as time series in a time-amplitude domain, which can be visually complex [1]. Since, the visual analysis is difficult in a time-amplitude domain, feature extraction methods have been used as a pre-processing step. The most commonly used feature extraction method is the representation of the original signal in a frequency-amplitude domain [24]. Fourier transformation is a widely used and well-known method for frequency domain representation of raw signals. However, in a Fourier transformation, the frequency-amplitude representation is not always useful for visual analysis [57]. For example, Fig 1 shows a real EEG signal consisting of two different classes and their power spectral densities. As can be seen in Fig 1, it is difficult to distinguish the two signals in the time-amplitude and frequency-amplitude domains.

Fig 1. Display of a sample EEG signal represented in the time-amplitude and frequency-amplitude domains.

The main reason for this problem is that the frequencies and amplitudes of different signals may be the same or very similar over a prolonged period [810]. Therefore, different domain transformation methods based on a local examination are also used. For example, short-time Fourier and wavelet transformations are widely used for local examination. However, different signals may not always show local differences. Moreover local differences in the same class (healthy subjects or patients) may occur during different time periods [1113]. Thus, in the literature, various feature extraction and classification methods have been used to overcome this problem [14, 15]. For example, other feature extraction methods such as an independent component analysis, principal component analysis or a modified version of Fourier analyses can be used. But the mathematical equations of these methods are more complex. Also, the representation of the raw signals in their created domains is difficult to understand except by signal processing experts. Therefore, it is very difficult for medical experts who need to make visual interpretations to use these methods [16]. As a result of these problems, an alternative method suitable to visual analysis and classification is needed.

The increase or decrease of the distance differences between samples is a common characteristic of digital biomedical time series (signals). For example, biomedical signals may sometimes contain samples that are far away from or close to each other. Since, the distance differences between samples do not occur throughout the entire signal, the visual detection of these differences is difficult [17]. Distance differences between samples in a specific time interval change the density of the signal in that interval. In this situation, the characteristic based on the distance between samples may be detected by determining the density difference. Therefore, density-amplitude domain representation of biomedical signals can be beneficial to visual interpretation.

In the first stage of this study, density coefficients of signal classes were obtained using the Parzen Windowing Method. Then, the class differences were visually examined in a density-amplitude representation. Upon visual examination, the characteristic differences of classes were visible in the density-amplitude domain representation. In addition, both the raw and transformed signals (all the signals represented in time-amplitude, frequency-amplitude and density-amplitude domains) could be used for the classification. The classification result demonstrated that the proposed method increases the classifier’s success. In a sense, the method proposed in this study is an improved version of the method proposed in our previous study [18]. In the previous study, time series were converted to density coefficients. However, visual interpretation of the data by using the coefficients was not possible. In this study, combined use of the amplitude values and corresponding density coefficients was proposed. Therefore, the method proposed in this study allows for visual interpretation of the data. However previous study doesn’t allow for visual interpretation of the data. Recently, complex network theory has been developed to characterize experimental univariate time series and multivariate time series [1922].

Materials and Methods


EEG data represent a rather complex biomedical time series. Although many methods have been suggested, Fourier transformation-based frequency-amplitude domain representation is still widely used to process the EEG data. [23]. However, visual detection of differences between EEG signals in the time-amplitude and time-frequency domains without pre-processing methods is difficult. Therefore the EEG signals are suitable for testing the proposed method. In this study, the EEG Eye State biomedical dataset was used for a detailed analysis. This dataset consists of EEG records with eyes open or closed. Therefore, there are two classes in the dataset. Each attribute of the dataset includes a signal from one EEG channel (amplitude data). The dataset was obtained from one subject. The duration of the measurement was 117 seconds. The sampling rate was 128 Hz. For each channel, single-trial analysis was used to provide a systematic mapping between the brain activity and stimulus information space and test the proposed method for possible cases. Signals were filtered using a Low Pass filter with a cutoff that was set at the limit of the EEG gamma band. A notch filter at 50Hz was used to eliminate the line interference artifacts. In addition, linear-filter method was used to eliminate the other EEG artifacts. The dataset was taken from a publicly available UCI database ( [24]. The characteristics of this dataset are shown in Table 1.

In addition, another dataset (sEMG Hand Movement Dataset) taken from the UCI database ( was used in the study to test and prove the classifier success of the proposed method [25]. There are six gestures of five volunteers in this data set. The aim is to distinguish the hand gestures for each volunteer. Characteristics of the sEMG data are as follows. The sampling rate was 500 Hz. The recording time was six seconds for each gesture. Signals were filtered using a Butterworth Band Pass filter with a low cutoff of 15Hz and high cutoff of 500Hz. A notch filter at 50Hz was used to eliminate the line interference artifacts. The general characteristics of the sEMG dataset can be seen in Table 2


In this study, the density coefficients were separately calculated for each class of each attribute (attributes are columns of the dataset). In other words, the density coefficients were calculated separately for each data class obtained from one EEG channel. Then, a new density-attribute matrix consisting of density coefficients and raw data (amplitude values that are the source of coefficients) was created by combining the old and new attributes in a single matrix. Next, the column pairs (two-column matrix parts that belong to each channel) consisting of the raw data and related coefficients were tested visually on two-axis graphs. The schematic block diagram of this study is shown in Fig 2. The obtained two-column matrices were tested by classification methods to determine the success statistically. The density-amplitude matrix creation process is shown in Fig 3.

Fig 2. Flow diagram of the study (Attribute (m-n) means the class m data in the nth attribute).

Fig 3. The matrix creation process used in the study (Amps. (n-m) means the class-n data of nth EEG channel signal).

It must be noted that the density coefficient calculation is made separately for each class, as shown in Fig 3. In other words, the density coefficient of a class element belonging to one channel is calculated considering only the other elements of the same class. In this study, the density coefficients were obtained by using the Parzen Windowing method. According to this method, the size and form of an R area (window) is fixed for the estimation of the density coefficients. To determine the density coefficient of an element, the R area is centered on this element, and the number of other elements in this area is calculated. In this case, the density value (coefficient) will be calculated by substituting the φ(u) function in Eq 2 to determine the elements to be included in the density calculation instead of the k function in Eq 1.


In Eq 1, x is the sample (element), n is the total number of elements, and V is the volume (dimension) of the dataset.


As seen in Eq 2, the φ(u) value will be 1 if the |uj| element exists within the window, otherwise it will be 0. That is, any |uj| element will contribute to the density coefficient if it is within the window. When the φ(u) function in Eq 2 is substituted in the density function in Eq 1, the density coefficients of the elements will be calculated using Eq 3 (3) Where d is the dimension of the dataset [2628]. Eq 3 means that the density coefficient of an element at the center of the window is proportional with the total number of the other elements within the window. Fig 4 shows a sample calculation of the density coefficients for X1 and X3 elements of dataset X, X = [X1, X2, X3, X4] = [(1,0) (2,0) (3,0)(5,0)].

Fig 4. Calculation of the density coefficients for two elements in a sample dataset.

The density coefficients of the sample dataset in Fig 4 are 0.1250 for X1, 0.1250 for X2, 0.1875 for X3 and 0.625 for X4. As seen in Fig 4, for each coefficient calculation, at least one element contributes to the calculation of the coefficient. This is achieved because of the selection of the window width as two times the maximum distance between the elements. This means that the window width must be at least two times the maximum distance between the elements in order to provide density coefficient for all of the elements. However, another issue that must be taken into consideration is that the coefficients must be as different as possible. If the window size is more than required (more than two times), many coefficients will be same as each other, and this will decrease the classifier accuracy [29, 30]. In this case, the more distant element gives the lowest density coefficient in the dataset. The coefficient of an element located at the center of the densest area in the dataset will be the biggest. As seen in Fig 4, the largest distance between the elements is 2 (the distance between the elements located at 3 and 5 on the horizontal axis), and the window width is two times this value. Therefore, the density coefficient of X3 located in the densest area was the highest (0.1875), and the density coefficient of X4 located in the rarest area was found to be the lowest (0.6250). Furthermore, it was possible to assign density coefficients to all the elements, and the density coefficients were calculated as different from each other as possible.

Since the objective of this study is to create a model that will allow the visual differentiation of signals that are difficult to differentiate in time-amplitude and frequency-amplitude domains, we used the example signals shown in Fig 5.

Fig 5. Display of two different signals represented in the time-amplitude and frequency-amplitude domains.

In Fig 5, two different signals and their frequency spectrums are shown. Both of the signals consist of two sinusoidal components of 5 Hz and 10 Hz. The occurrence times of the components of the signals are different. The amplitudes of the signal components having the same frequency are different from each other by 10%. This amplitude difference can be identified if the example signals are examined carefully. However, such small differences are continuous in biomedical signals, and thus visual detection of such differences would be rather difficult. The frequency spectra of the signals are almost the due to the same frequency content, a common issue in biomedical signals. Very detailed examinations or some preliminary procedures are required to analyze such small differences, particularly on EEG records consisting of thousands of samples. These types of signals cause failure in classification [31].

Considering the signal-X in Fig 5, the first half is 5 Hz and the second half is 10 Hz sine waves. This situation is reversed in the signal-Y, which causes dense locations of the signals that are different. As an average calculation, the maximum amplitudes of the signal-Y components are 10% less than those of signal-X. In this case, the difference between the example signals in Fig 5 is clearly revealed by the relation between their amplitudes and related coefficients. When the proposed method is used for the sample signals shown in Fig 5, the density-amplitude domain is as shown in Fig 6.

Fig 6. Density-amplitude domain representation of 3rd channel data (Blue: class-1 data, Red: class-2 data).

Fig 6 shows that the signals are no longer similar, and the difference between them can be visually detected easily. As also seen in Fig 6, the differences in the densities of the amplitudes near zero are greater because the density coefficients of amplitudes with lower values increased as the signal-Y amplitudes increased closer to zero. According to another definition, the density coefficient increase is inversely proportional to the scattering of the elements of the signal. In summary, the proposed method will be useful in visually differentiating the signals that are difficult to differentiate in time-amplitude and frequency-amplitude domains.

In addition, the well-known ROC analysis and Cross Validation (CV) methods were used to obtain more reliable results. According to the conventions of the CV method, in each cycle 90% of the data was used as a training set and the remaining 10% was used as a test set. Using the ROC method, the accuracy, sensitivity, and specificity rates can be computed by: (4) (5) (6) Where TP is the number of correctly classified disorders (Disorders correctly classified as disorder), FP is the number of falsely classified disorders (Healthy ones incorrectly classified as disorder), TN is the number of correctly classified healthy subjects (Healthy ones correctly classified as healthy), and FN is the number of falsely classified healthy subjects (Disorders incorrectly classified as healthy). Also, P is the number of disorders, and N is the number of healthy subjects [32].

Results and Discussion

The EEG dataset used in this study has periods recorded when eyes are opened or closed. The aim is to differentiate/classify the two classes consisting of closed eye and opened eye periods. In the first stage, the visual interpretation advantage of the proposed method will be shown on a randomly selected attribute of the EEG data matrix. Then, the results of the proposed method will be applied to the classifiers to evaluate the classification accuracies. The time-amplitude and frequency-amplitude representations of one attribute (third column of the dataset) are shown in Figs 7 and 8, respectively.

Fig 7. The time-amplitude representations of classes belonging to the same attribute.

This attribute is also used in this study.

Fig 8. The frequency-amplitude representations of classes belonging to the same attribute.

This attribute is also used in Fig 7.

The peaks shown in Fig 7 may be due to eye movement or other causes [33]. For this reason, it is difficult to determine whether the eye is open or closed using the graphs in Fig 7. In Fig 8, it is impossible to determine the change in eye status (open/closed) without performing some preliminary procedures. However, the difference between the eye situations can be revealed by using the density-amplitude relationship.

Therefore, the two column density-amplitude matrix of the attribute used in Figs 7 and 8 was obtained. Then the density-amplitude graph was created by using the two column matrix values shown in Fig 9.

Fig 9. The density-amplitude representations of classes belonging to the same attribute.

This attribute is also used in Figs 7 and 8.

As shown in the distributions in Fig 9, there is a visible density difference between the class amplitude values for all of the points except the outliers. Thus, it can be seen that the data density is lower when the eyes are closed.

Furthermore, the biggest density-difference between the classes is across the average of the amplitude values of the dataset. The class differences seen in the Density-Amplitude domain can’t be detected in the Time-Amplitude or Frequency-Amplitude domains of the same data.

When Fig 9 is examined from another perspective, the density difference occurs between 4235 μV and 4290 μV. That is, the classes are different between these amplitude values. These values are very close to the standard deviation range of the density-amplitude distributions. If the amplitudes within the standard deviation of the density-amplitude distribution are filtered, the classifier success will be further improved. Moreover, the statistical values (including standard deviation, mean value, etc.) can be examined visually. The classifier success is also expected to be very high since the classes can be differentiated visually. In the second stage of this study, the attributes (represented in Time-Amplitude, Frequency-Amplitude and Density-Amplitude domains) were subjected to classifiers to test the ability to distinguish between domains. The test results are shown in Table 3. 14 different channel data obtained from 1 subject were considered in Table 3. Also the number of Negatives (N) is 8257 and the number of Positives (P) is 6723 for each classification process.

The K parameter providing the highest accuracy rate was used in the KNN classifier. In addition, the Euclidean distance was used in the KNN classifier. In the SVM classifier, a linear kernel was used and the margin providing highest accuracy rate was selected (i.e., margin was selected so as to make training error small). The Maximum Likelihood Estimator (MLE) was used to select parameters in the Naive Bayes classifier. As seen in the results given in Table 3, the classification success of the density-amplitude matrices was the highest, supporting the visual differentiation ability. That is, the classifier success can be increased by representing the raw data in the density-amplitude domain.

In this study, the attribute used in Fig 9 was tested to show that the distinguishing ability of the proposed method is not incidental. However, artificial classes were created by changing known class labels in this test stage. In the artificial class creation stage, the first and second halves of Class-1 were recognized as different classes. Then Class-1 was classified assumed as an attribute data. The Density-Amplitude graph of this artificial classified data is shown in Fig 10.

Fig 10. The density-amplitude graph of the 3rd attribute of the dataset (Class-1 is divided to get two fake (pseudo) classes.

Both fake classes are related to the ‘eyes open’ status).

As seen in Fig 10, the class difference is not visible. Thus the proposed method is not incidental and reveals only the class differences.

Finally, the proposed method was tested using a different data set to demonstrate the success of the proposed method in a different biomedical time series. In this second classification stage, the EMG data set was used. The classifier results are shown in Table 4. Six different gestures requested 30 times from each of the 5 subjects were considered in Table 4. Also the number of Negatives (N) and the number of Positives (P) are 3000 for each classification process.

The K parameter providing the highest accuracy rate was used in the KNN classifier. In addition, the Euclidean distance was used in the KNN classifier. In the SVM classifier, a linear kernel was used and the margin providing highest accuracy rate was selected (i.e., margin was selected so as to make training error small). The Maximum Likelihood Estimator (MLE) was used to select parameters in the Naive Bayes classifier. As shown in Table 4, the proposed method increased the classifier success again.

In summary, the findings demonstrate the superiority of the proposed method over other methods in biomedical time series analyses. Its strength is related to biological induced convergence/divergence between the signal samples of biomedical time series. The proposed method converts convergence/divergence to density coefficients and then associates the amplitudes with related coefficients. Thus it offers a novel advantageous solution.


In this study, 2 biomedical time series that are complex in the time-amplitude and frequency-amplitude domains were analyzed in the density-amplitude domain. The results demonstrated that the proposed method made possible the visual interpretation of characteristically complex biomedical time series. For example, visual inspection of amplitude differences between two different datasets, standard deviation differences and mean value differences were easily differentiated. As a result of these analyses, some diseases can be visually diagnosed in the density-amplitude domain, and biomedical time series can be classified with greater accuracy using the proposed method. While the proposed method uses only four basic arithmetic operations (+, -, × and ÷), the other methods use complex mathematical formulas. Therefore, the proposed method will be faster and clearer for medical experts. In addition, this easy calculation can permit an online evaluation while the signal is being recorded.

This method is especially useful for digital biomedical time series with sample convergence/divergence characteristics. Thus, the proposed method may also be more successful for local analysis. E.g., analysis of similar signal changes of two signals that may occur in different time periods will be examined to determine the difference between them in relation to time. If so, the use of the proposed method for local analysis may also be an alternative for STFT and wavelet transformations.

However, it must be noted that the proposed method may give erroneous results if the convergence/divergence of samples are not related to biological origin. This may appear as a disadvantage; however, this problem is true of all of the other methods, as well. Therefore, this is not a unique drawback of the proposed method. In other words, these sample types (samples are not biological originated) known as the outliers are problem for all methods. If so, this disadvantage can be avoided by filtering (outlier filtering) the samples that are not biological originated.

In conclusion, the obtained results will help expert medical doctors interpret data and will contribute to the visual and mathematical classification of biomedical time series. It provides an alternative to the frequency-amplitude based analysis of biomedical time series.

Author Contributions

  1. Conceptualization: SBA.
  2. Data curation: SBA AA.
  3. Formal analysis: AA.
  4. Investigation: AA.
  5. Methodology: SBA AA.
  6. Project administration: SBA.
  7. Resources: SBA AA.
  8. Software: SBA.
  9. Supervision: SBA AA.
  10. Validation: SBA.
  11. Visualization: AA.
  12. Writing – original draft: SBA.
  13. Writing – review & editing: SBA AA.


  1. 1. Rangayyan RM. Biomedical signal analysis. John Wiley & Sons, 2015.
  2. 2. Velez FD, Ge Y, Kohane I. Comorbidity Clusters in Autism Spectrum Disorders: An Electronic Health Record Time-Series Analysis. Pediatrics 2014; 133:54–63. pmid:24323995
  3. 3. Wua SD, Wua CW, Linb SG, Leec KY, Pengd CK. Analysis of complex time series using refined composite multiscale entropy. Physics Letters A 2014; 378:1369–1374.
  4. 4. Devasahayam SR. Signal and Systems in Biomedical Engineering. USA: Springer US, 2012.
  5. 5. Reaz MBI, Hussain MS, Yasin FM. Techniques of EMG signal analysis: detection, processing, classification and applications. Biological procedures online 2006; 8(1): 11–35. pmid:16799694
  6. 6. Najarian K, Robert S. Biomedical signal and image processing. CRC press, 2005.
  7. 7. Wacker M, Witte H. Time-frequency Techniques in Biomedical Signal Analysis. Methods Inf. Med. 2013; 52(4): 279–296. pmid:23703538
  8. 8. Richard S. Introduction to applied statistical signal analysis: Guide to biomedical and electrical engineering applications. Academic Press, 2010.
  9. 9. Allen RL, Duncan M. Signal analysis: time, frequency, scale, and structure. John Wiley & Sons, 2004.
  10. 10. Stoica P, Randolph LM. Spectral analysis of signals. Upper Saddle River, NJ: Pearson/Prentice Hall, 2005.
  11. 11. Li H, Yuping Z, Haiqi Z. Hilbert-Huang transform and marginal spectrum for detection and diagnosis of localized defects in roller bearings. Journal of Mechanical Science and Technology 2009; 23(2): 291–301.
  12. 12. Du P, Warren AK, Simon ML. Improved peak detection in mass spectrum by incorporating continuous wavelet transform-based pattern matching. Bioinformatics 2006; 22(17): 2059–2065. pmid:16820428
  13. 13. Fonseca PR. A new tool for nonstationary and nonlinear signals: The HilbertHuang Transform in biomedical applications. INTECH Open Access Publisher, 2011.
  14. 14. Wang F, Ji Z. Application of the Dual-tree Complex Wavelet Transform in Biomedical Signal Denoising. Bio-Medical Materials and Engineering 2014; 24:109–115. pmid:24211889
  15. 15. Jaya PS, Manab KD, Samit A, Behera S. Autocorrelation and Hilbert transformbased QRS complex detection in ECG signal. International Journal of Signal and Imaging Systems Engineering 2014; 7:52–58.
  16. 16. Baese AM, Schmid V. Pattern Recognition and Signal Anaylsis In Medical Imaging. Kidlington. Oxford: Academic Press In An imprint of Elsevier, 2014.
  17. 17. Eugenijus K. Biomedical Signals and Sensors I. Hiedelberg, Berlin, Germany: Springer-Verlag, 2012.
  18. 18. Akben S. B., & Alkan A. Density-Based Feature Extraction to Improve the Classification Performance in the Datasets Having Low Correlation Between Attributes. Journal of The Faculty of the Engineering and Architecture of Gazi University; 2015, 30(4,) 597–603.
  19. 19. Gao ZK, Yang YX, Zhai LS, Ding MS, Jin ND. Characterizing slug to churn flow transition by using multivariate pseudo Wigner distribution and multivariate multiscale entropy. Chemical Engineering Journal 2016, 291; 74–81.
  20. 20. Gao ZK, et al. Multivariate weighted complex network analysis for characterizing nonlinear dynamic behavior in two-phase flow. Experimental Thermal and Fluid Science 2015, 60; 157–164.
  21. 21. Gao ZK, et al. Multi-frequency complex network from time series for uncovering oil-water flow structure. Scientific reports, 2015, 5; 8222. pmid:25649900
  22. 22. Gao ZK, Jin ND, A directed weighted complex network for characterizing chaotic dynamics from time series. Nonlinear Analysis: Real World Applications, 2012, 13(2); 947–952.
  23. 23. Saeid S, Chambers JA. EEG Signal Processing. Wiley, 2013.
  24. 24. Akben SB, Online EEG eye state detection in time domain by using local amplitude increase. Journal of Multidisciplinary Engineering Science and Technology (JMEST) 2014; 1: 143–146.
  25. 25. Akben SB. Classification of Hand Movements Related to Grasp by Using EMG Signals. 19th National Biomedical Engineering Meeting (BIYOMUT 2015); 2015.
  26. 26. Babich GA. Weighted Parzen windows for pattern classification. Pattern Analysis and Machine Intelligence IEEE Transactions on 2002; 18: 567–570.
  27. 27. Wanga S, Chungb F, Xionga F. A novel image thresholding method based on Parzen window estimate. Pattern Recognition 2008; 41: 117–129.
  28. 28. Erdogmus D, Hild KE, Principe JC, Lazaro M, Santamaria I. Adaptive Blind Deconvolution of Linear Channels Using Renyi’s Entropy with Parzen Window Estimation. IEEE Transactions on Signal Processing 2004; 52: 1489–1498.
  29. 29. Veon K L. Localized support vector machines using Parzen window for incomplete sets of categories. Applications of Computer Vision (WACV) IEEE Workshop on; 2011.
  30. 30. Husson R. Advanced Information Processing in Automatic Control (AIPAC'89): Selected papers from the IFAC/IMACS/IFORS Symposium, Nancy, France, 1989.
  31. 31. Vyas N. Biomedical Signal Processing. New Delhi, India: University Science Press, 2011.
  32. 32. Wright A., McCoy A. B., Henkin S., Kale A., Sittig D. F. Use of a support vector machine for categorizing free-text notes: assessment of accuracy across two institutions. Journal of the American Medical Informatics Association; 2013, 20(5), 887–890. pmid:23543111
  33. 33. Saeid S, Chambers A. EEG Signal Processing. Wiley, 2013.