Application of Computational Intelligence Techniques for Cardiovascular Diagnostics

Hemodynamic instability is most commonly associated with abnormal or unstable blood pressure (BP), especially hypotension, or more broadly associated with inadequate global or regional perfusion. Inadequate perfusion may compromise important organs, such as heart and brain, due to limits on coronary and cerebral auto regulation and cause life-threatening illnesses, or even death. Therefore, it is crucial to identify patients who are likely to become hemodynamically unstable to enable early detection and treatment of these life-threatening conditions (Cao, Eshelman et al. 2008). Modern intensive care units (ICU) employ continuous hemodynamic monitoring (e.g., heart rate (HR) and invasive arterial BP measurements) to track the state of health of the patients. However, clinicians in a busy ICU would be too overwhelmed with the effort required to assimilate and interpret the tremendous volumes of data in order to arrive at working hypotheses. Consequently, it is important to seek to have automated algorithms that can accurately process and classify the large amount of data gathered and to identify patients who are on the verge of becoming unstable (Cao, Eshelman et al. 2008).


Introduction
Cardiovascular disease, including heart disease and stroke, remains the leading cause of death around the world.Yet, most heart attacks and strokes could be prevented if it were possible to provide an easy and reliable method of monitoring and diagnostics.In particular, the early detection of abnormalities in the function of the heart, called arrhythmias, could be valuable for clinicians.
Hemodynamic instability is most commonly associated with abnormal or unstable blood pressure (BP), especially hypotension, or more broadly associated with inadequate global or regional perfusion.Inadequate perfusion may compromise important organs, such as heart and brain, due to limits on coronary and cerebral auto regulation and cause life-threatening illnesses, or even death.Therefore, it is crucial to identify patients who are likely to become hemodynamically unstable to enable early detection and treatment of these life-threatening conditions (Cao, Eshelman et al. 2008).Modern intensive care units (ICU) employ continuous hemodynamic monitoring (e.g., heart rate (HR) and invasive arterial BP measurements) to track the state of health of the patients.However, clinicians in a busy ICU would be too overwhelmed with the effort required to assimilate and interpret the tremendous volumes of data in order to arrive at working hypotheses.Consequently, it is important to seek to have automated algorithms that can accurately process and classify the large amount of data gathered and to identify patients who are on the verge of becoming unstable (Cao, Eshelman et al. 2008).
Modern ICUs are equipped with a large array of alarmed monitors and devices which are used to try to detect clinical changes at the earliest possible moment so as to prevent any further deterioration in a patient's condition.The effectiveness of these systems depends on the sensitivity and specificity of the alarms, as well as on the response of the ICU staff to the alarms.However, when large numbers of alarms are either technically false, or true, but clinically irrelevant, response efficiency can be decreased, reducing the quality of patient care and increased patient (and family) anxiety (Laramee, Lesperance et al. 2006).
It is patently obvious that physiological time series such as hemodynamic and electrophysiological data represent the physiological state of subjects in a medical environment.These time series are collected over long periods of time and are usually a source of a large number of interesting behaviors or features which have the potential to be used in identifying and predicting a subject's current and future state of health.However, the high dimensionalities and complexity of the measured physiological signals make the interpretation and analysis difficult, if not impossible.Hence, although they clearly contain useful information, these signals cannot be used directly.Extraction of such hidden information can be addressed using the concept of feature extraction.Essentially, feature extraction is focused on dimensionality reduction and on revealing information from the different time scales that underlie physical phenomena.Also of importance is the concept of classification, where the features are employed in an intelligent algorithm to classify the patient, for example, as healthy or sick.Clearly, this is a broad area with an increasingly diverse set of applications.In order to illustrate the power and utility of these methods, and given the limited space, we limit ourselves to two examples both of which illustrate feature extraction and classification approaches.
The first application discussed in this chapter is the detection of cardiac arrhythmia detection.In this application, we apply continuous wavelet transform (Daubechies 2006) and principal component analysis (Jolliffe 2002) as feature extraction tools and artificial neural network algorithm as a classifier (Caudill 1989).
The second application discussed concerns the identification of ICU patients.In this example, we apply some novel feature extraction techniques to highlight the differences between healthy and patient subjects.Then we apply fuzzy decision theory (Zadeh 1968) as a final classifier.

An improved procedure for detection of heart arrhythmias
The electrocardiogram (ECG) plays an important role in the process of monitoring and preventing heart attacks.The typical ECG, shown in Figure 1, consists of three basic waves: P, QRS, and T.These waves correspond to the far field induced by specific electrical phenomena on the cardiac surface, namely, the atrial depolarization, P, the ventricular depolarization, QRS complex, and the ventricular repolarization, T. It should be noted however that the ECG signal does not look the same in all the leads of the standard 12-lead system used in clinical practice.
There is increasing recognition that computer-based analysis and classification of diseases could be very helpful in diagnostics and several algorithms have been reported in the literature for detection and classification of ECG beats using artificial neural networks (ANN).It has indeed been shown that neural networks are particularly able to recognize and classify ECG signals more accurately than other classification methods (Ozbay and Karlýk 2001).
The techniques, developed for automated detection of changes in electrocardiographic signals, work by transforming the mostly qualitative diagnostic criteria into a more objective quantitative signal feature classification problem.This transformation of the ECG signals has been carried out in the past using techniques such as autocorrelation function, time frequency analysis, and wavelet transforms (WT) (Maglaveras, Stamkopoulos et al. 1998;Addison, Watson et al. 2000;Kundu, Nasipuri et al. 2000;Dokur and Olmez 2001;Saxena, Kumar et al. 2002).Results of these and other studies in the literature have demonstrated that WT is the most promising method to extract features that characterize the behavior of ECG signals in an effective manner.A study of the nonlinear dynamics of electrocardiogram signals for arrhythmia characterization was presented by Owis (Owis, Abou-Zied et al. 2002).They selected the correlation dimension and the largest Lyapunov exponent as two features for characterizing five different classes of ECG signals.The statistical analysis of the calculated features indicated that they differ significantly between the normal heart rhythm and the different arrhythmia types and, hence, can be somewhat useful in ECG arrhythmia detection.However, their study is limited by the fact that the discrimination between different arrhythmia types is difficult using those features.Application of the wavelet transform, principal component analysis (PCA) and several types of artificial neural network structures to detect and classify different kinds of heart arrhythmias have also been reported (Silipo and Marchesi 1998); this study compared results of different neural network structures in order to find the best one for the classification of specific types of arrhythmias.A neural network classifier was used by (Christov and Bortolan 2004) to recognize premature ventricular contraction arrhythmia beats in an ECG signal database.A combination of neural network and discrete wavelet transform (DWT) has also been applied for detecting four types of heart arrhythmias (Guler and Ubeyli 2005).Another application of a combination of wavelet transform and ANN in arrhythmia detection is proposed in the study by Vikas (Vikas and Sahambi 2004).In the first step, a set of discrete wavelet transform coefficients which contain the maximum information about the arrhythmia is selected from the wavelet decomposition.Then, these coefficients, in addition to the information about the RR interval, QRS duration, and amplitude of the R-peak, are fed into a multi-layer perceptron algorithm.They reach an overall accuracy of 98% in the classification of 47 patient records.
Papaloukas, et al. (Papaloukas, Fotiadis et al. 2002) used a neural network classifier to detect and classify ischemic arrhythmia episodes in the ECG signal.They also used PCA to select and extract features from the ECG signal.Lee (Lee, Park et al. 2005) applied linear discriminant analysis to 17 input features, which were based on wavelet coefficients, to reduce the feature dimension from 17 to 4, for arrhythmia detection.Then, a multi-layer perceptron classifier was applied to detect 6 types of arrhythmia beats from a 4-dimensional input feature.Foo (Foo, Stuart et al. 2002) compared and evaluated different types of multilayer neural network structures as the ECG pattern classifiers and finally settled on a two-layer feed-forward neural network.However, their work is limited to detecting only two types of patterns including normal beats and premature ventricular contractions (PVC).Acharya, et al. (Acharya, Bhat et al. 2003) proposed an algorithm based on a neural network classifier and fuzzy cluster to analyze ECG signals.They compared these two classifiers and reported the fuzzy cluster as a better classifier in comparison with the neural one.They classified 4 types of ECG signals including ischemic cardiomyopathy beat, complete heart block beat, atrial fibrillation beat, and normal beat.Also, Ozbay (Ozbay, Ceylan et al. 2006) proposed a comparative study of the classification accuracy of ECG signals using a wellknown neural network architecture, a multi-layered perceptron (MLP) structure, and a new fuzzy clustering neural network architecture (FCNN) for early diagnosis; They used these two classifiers to classify 10 types of ECG signals.Based on their test results they suggested that a new proposed FCNN architecture can generalize better than ordinary MLP architecture and could also learn better and faster.The advantage of their proposed structure was a result of reduction in the number of segments by grouping similar segments in training data with fuzzy C-means clustering.
Zhang (Zhang and Zhang 2005) developed an algorithm for recognizing and classifying four types of ECG signal beats including normal beat, left bundle branch block beat, right bundle branch block beat and premature ventricular contraction PVC beat.They extracted the principal characteristics of the signals by means of the PCA technique and they showed that out of 100 principal components, the first 30 principal components have most of the total energy of the data set and hence used it as the input vector for the classifier.Among different types of classifiers, they used the support vector machine (SVM), which has exhibited very good success compared to other classification methods in complicated problems.A comparison between different classifiers is also presented in their research.A comparison between different structures for heart arrhythmia detection algorithms based on neural network, fuzzy cluster, wavelet transform and principal component analysis, was carried out by Ceylan (Ceylan and Ozbay 2007).Kutlu (Kutlu, Kuntalp et al. 2008) applied a K-nearest neighborhood algorithm for the purpose of classification.They extracted features from the electrocardiograph signals by using higher order statistics.They achieved an accuracy of 97.3% in classifying 5 types of heart arrhythmias.Cvikl (Cvikl and Zemva 2010) designed a fieldprogrammable gate array-based (FPGA) system for ECG signal processing.Their system performs QRS complex detection and beat classification into either normal or PVC.They reached a sensitivity of 92.4% for PVC detection.
The most difficult problem faced by today's automatic ECG analysis is the large variation in the morphologies of ECG waveforms, not only of different patients or patient groups but also within the same patient.The ECG waveforms may differ for the same patient to such an extent that they could be unlike each other, and at the same time, alike for different types of beats.This is the main reason that the beat classifiers, which were reviewed in this study, perform well on the training data, while generalizing poorly when presented with the ECG www.intechopen.comwaveforms of different patients (Ozbay, Ceylan et al. 2006).We address this problem of beat classifier performance by using a combination of continuous wavelet transform (CWT) and principal component analysis in order to prepare a more effective input data for the artificial neural network classifier.Since this would lead to a better input vector structure for the neural network classifier, we expect to obtain a better and more accurate performance of the classifier.Moreover, we propose to use a signal filtering method in order to remove ECG signal baseline wandering which can be further expected to improve classification.This section is not focused on improving the processing techniques such as CWT and PCA or on improving the neural network structure.It is instead focused on designing an innovative algorithm which is a combination of these techniques in order to achieve reasonably accurate classification results in the field of heart arrhythmia detection.Although we address a better classification performance in the field of heart arrhythmia detection, another interesting achievement of this study is that the classifier in this study detects 6 types of ECG signals including the normal signal and 5 types of arrhythmia beats.This quantity of ECG signal types studied here is a much larger number in comparison with other studies in this field.The structure proposed in this section is composed of three sub stages: (a) continuous wavelet transform, which provides feature extraction; (b) principal component analysis, which performs elimination of inconsiderable features; and finally, (c) multilayer perceptron neural network, working as a final classifier.
The outline of this section is as follows; a basic definition of CWT is presented in Section 2.1.In Section 2.2 the procedure of computing principal components of a data set is provided.In Section 2.3, the designed algorithm of our study is presented with a detailed explanation.Finally, in Section 2.4, the results of our study are presented.

Continuous wavelet transform
The wavelet transform (WT) provides very general techniques, which can be applied to many tasks in signal processing.Wavelet transform can be thought of as an extension of the classic Fourier transform; the difference is that, instead of working on a single scale (time or frequency), it works on a multi-scale basis and describes the signal's frequency content at given times.This multi-scale feature of the WT allows the decomposition of a signal into a number of scales, each scale representing a particular coarseness of the signal under study.
Continuous wavelet transform (CWT) is a time-frequency analysis method which differs from the more traditional short time Fourier transform (STFT) by having a variable window width, which is related to the scale of observation.Another important distinction from the STFT is that the CWT is not limited to using sinusoidal analyzing functions (Osowski and Linh 2001); a large selection of localized waveforms can be employed as the analyzing function.The wavelet transform of a continuous time signal, x (t), is defined as where ψ*(t) is the complex conjugate of the analyzing wavelet function ψ(t), a is the dilation parameter of the wavelet, which is called 'scale', and b is the location parameter of the wavelet (Osowski and Linh 2001).
The Cardiovascular System -Physiology, Diagnostics and Clinical Implications 216

Principal component analysis
Principal component analysis (PCA) has become a well-established technique for feature extraction and dimensionality reduction.An assumption made for feature extraction and dimensionality reduction by PCA is that most of the information of the observation vectors, with the dimension p, is contained in the subspace spanned by the first m principal axes, where . Therefore, each original data vector can be represented by its principal component vector with dimensionality m (Ceylan and Ozbay 2007).This procedure decreases the data dimensionality without significant loss of information (Addison 2005).
Principal components analysis has been used in a wide range of biomedical problems, including the analysis of ECG data (Silipo and Marchesi 1998;Wang and Paliwal 2003;Addison 2005;Ceylan and Ozbay 2007).
In order to apply PCA on a data set, X, the following five steps are required (Zhang and Zhang 2005; Ceylan and Ozbay 2007): 1. Subtract the mean value, μ, from each of the data dimensions.
where, , μ is the sample mean, and N is the number of samples.
3. Calculate the eigenvectors and eigenvalues of the covariance matrix.4. Choose the components and form a feature vector.
In general, once the eigenvectors are found from the covariance matrix, the next step is to order them by decreasing order of the magnitude of the eigenvalue.Then the feature vector is constructed by taking the corresponding eigenvectors.
Once the components (or eigenvectors) have been chosen and the feature vector is constructed, the final data is constructed by pre-multiplying by the transpose of the feature vector as shown below.

Final Data = Row Feature Vector x Row Data Adjust
where, 'Row Feature Vector' is the transpose of the matrix with the eigenvectors in the columns, 'Row Data Adjust' is the transpose of the mean-adjusted data matrix, and 'Final Data' is the final data set, with data items in columns.

Methodology
A schematic of the designed algorithm in this study is shown in Figure 2.This algorithm consists of three stages: pre-processing, main process and finally, classification of the ECG beats.The data of ECG signals used in this study are taken from the MIT-BIH ECG signal p m< database, including normal beats and five types of different arrhythmia beats.MIT-BIH ECG signal database is a well-known standard database which has been used in many research projects reported in the literature (Silipo and Marchesi 1998;Owis, Abou-Zied et al. 2002;Zhang and Zhang 2005;Ceylan and Ozbay 2007;Cvikl and Zemva 2010).For this study, the selected types of arrhythmias are atrial premature beats (A), right bundle branch block beats (R), left bundle branch block beats (L), paced beats (P), and premature ventricular contraction beats (PVC or V).

Pre-processing
This stage includes four levels of data processing: signal filtering, sample selection, feature extraction, and dimensionality reduction.
In the stage of signal filtering, a mathematical method presented by Ghaffari (Ghaffari, SadAbadi et al. 2006) is employed to remove baseline wandering of the ECG signal.www.intechopen.com The Cardiovascular System -Physiology, Diagnostics and Clinical Implications 220 The choice of the analyzing function in wavelet transform, which is called the mother wavelet, has a significant effect on the result of analysis and should be selected carefully based on the nature of the signal (Addison 2005).Several mother wavelets, such as Morlet and Mexican-hat, have been used in ECG signal analysis for component detection and disease diagnosis (Stamkopoulos, Diamantaras et al. 1998).Because of the harmonic nature of Morlet and Mexican-hat, they are often used for analysis of harmonic signals.These mother wavelets are not likely to be suitable options in the case of ECG signal classification.
In fact, the simplicity of the computed CWT coefficients can be used as a convenient criterion to help in the selection of the mother wavelet as shown below.
Figure 7 shows a normal signal and its CWT with different mother wavelets in the scale a=10.Figure 7.a shows a normal signal beat, which has three picks.Figure 7.b shows CWT of the same signal beat with 'Haar' mother wavelet.This figure is very simple and the effects of the raw signal picks are obvious and observable.These effects can be analyzed easily and the extracted features would be suitable and appropriate for the data classification.Also, these computed coefficients can represent morphological differences very well.Figure 7.c shows CWT of the signal with 'Mexican-hat' mother wavelet.The effect of raw signal picks is not obvious in this figure and cannot be analyzed easily.Although this figure is not complicated, the extracted features do not seem to be useful for classification of the data since they are similar to each other.Figure 7.d, 7.e, and 7.f show CWT of the signal with 'Morlet', 'Daubechies8 (db8)' and 'Symlet6 (sym6)' mother wavelets, respectively.It is obvious in these figures that the computed CWT coefficients are similar to each other.Moreover, these figures are quite complicated, and the effects of raw signal picks are not obvious and cannot be analyzed easily.Therefore, the computed CWT coefficients are not suitable features for data classification, since they are similar to each other and cannot represent morphological differences very well.Hence, in this study, 'Haar' mother wavelet has been selected for feature extraction.
To compute the CWT of signals, it is not necessary to use scales in the range of 1 through 100.In view of the fact that computing CWT of signals in this range of scales will lead to a huge volume of data as extracted features, it is not advisable to use it.Instead, a specific range of scales, which is suitable and appropriate for feature extraction, is needed.The following is an analysis to determine the appropriate range of scales for the current study.
Figure 8 shows 200 samples of a raw normal signal from record 208 from MIT-BIH database and its CWT in different scales, with the 'Haar' mother wavelet.In Figure 8.a, the raw normal signal beat is shown.This signal has 3 picks, which are numbered on the figure; these picks are related to P, R, and T waves.Figure 8.b shows CWT of the signal in scale a=5.
In this figure, the noise of the signal has been highlighted; however, the extent of noise is not so large as to interfere with the performance of the neural classifier, and as a result, it is possible to analyze the effect of noise of the raw signal.Moreover, the effect of picks number 1 and 3 can be analyzed to some extent.Figure 8.c shows CWT of the signal in scale a=10.In this figure the effect of the three picks is fully observable and can be analyzed completely; note that there is little noise in the figure.Figure 8.d, which shows CWT of the signal in scale a=20, has no noise and only the effect of three picks can be analyzed according to it.Figures 8.e, 8.f, and 8.g show CWT of signal in scales a=50, 80 and 100, respectively.These figures are similar to each other and neither the noise of the raw signal nor the effect of its picks can be analyzed from these figures; therefore, these figures are not useful for the analysis.It is obvious that morphological differences, which are useful and necessary for neural classifier performance, have been eliminated in these figures.Hence, these extracted features are not appropriate for the neural classifier.From the above analysis, it is clear that computing CWT of the signals in the range of scales from a=5 to 20 can lead to a complete and useful analysis.Since both noise of signals and the effect of morphological differences can be analyzed in this range, the extracted features would be useful for classification of the signals under study.
In this study and for the stage of feature extraction, scales in the range of a = 6 through 15 are used that lead to matrices with 10 X 150 dimension for each segment, where each row includes the CWT coefficients in each scale.Using this range of scales has two advantages.First, by computing CWT in the range of a = 6 through 9, the ECG signal can be analyzed in detail.Second, by using the range of a = 10 through 15, the general morphology of the signal and its differences with other types of ECG signals can be highlighted.
It should be noted that computing CWT of signals in ten scales can represent morphological differences between several types of ECG signals better than computing CWT of signals in one scale only because of the fact that the differences are analyzed 10 times.This would hence be expected to result in a better performance of the neural classifier.
It would not be efficient to use a huge amount of data to perform a pattern recognition process.Hence, in the final level of pre-processing of our algorithm, PCA is applied on the computed matrices of wavelet coefficients, where each of them is a 10x150 matrixes, resulting in 10 principal component (PC) vectors.
In this study and for the stage of dimensionality reduction, the first three PC vectors have been selected and arranged as the neural network classifier input vector.This number of PC vectors was chosen according to the results which are presented in Table 1.In this table the accuracy of the neural network classifier with respect to the selected number of PC vectors is shown.
According to Table 1, the accuracy of the neural network classifier increases as the number of selected PC vectors increases from 1 to 5, since, by increasing the size of data in this level and this range, the classifier will have a more appropriate set of data for classification.The accuracy of the neural network classifier decreases as the number of selected PC vectors increases from 5 to 10, since at this level, the size of the data is too much for the classifier to have a good performance.Since the difference between classification accuracy in the case of 3 PC vectors and 5 PC vectors is not that significant, we chose 3 PC vectors in order to have a reasonable accuracy, while reducing the computational effort.As a result, by selecting only three PC vectors, dimensionality reduction without significant loss of data information is achieved, leading to a better performance of the neural classifier.These results, which are based on a trial and error method, are not necessarily identical for all kinds of data and all types of algorithm structures.For any change in the algorithm, this analysis should be carried out again in order to find the appropriate number of PC vectors as a classifier input.
The prepared vectors, which are the principal components, are used as the neural network classifier input vector.The analysis for providing the input vector structure is the same for both the training and testing database.

Main process
After finishing the pre-processing stages, data is ready as the input vector for the neural network classifier.In this study, a classical multi-layer perceptron neural network (MLPNN) structure (Silipo and Marchesi 1998;Guler and Ubeyli 2005) is used as the neural network classifier structure.This MLPNN is trained with the back propagation method of error.Selection of the neural network inputs is the most important component of designing the neural network based pattern classification since even the best classifier will perform poorly if the inputs are not selected well (Guler and Ubeyli 2005).The inputs of neural network in this study are constructed in the way which was described in previous section.
In our algorithm, we used a classical MLPNN structure with 2 hidden layers and with 60 nodes in the first hidden layer and 15 nodes in the second hidden layer for 160 iterations.
The structure of this MLPNN classifier with input, hidden, and output layers is shown in Figure 9.For this structure, the training error was selected to be 0.01 in order to have precise neural network training.From all 6 types of ECG beats under study and for neural network training data, two segments have been selected and processed in the way that was described in previous section.

Classification
When the neural network has been trained, it is ready as a classifier to detect and classify different types of ECG signals into one of six ECG beat groups under study.The classifier has been tested by 100 segments from each group of ECG signals.These testing segments are processed and prepared exactly like the input vector of the neural network; this means that all four levels of pre-processing stage have been applied to each segment in order to prepare it as a testing segment.These segments are used to test and evaluate the trained neural network classifier.

Results
As stated earlier, the MIT-BIH arrhythmia database is used to evaluate the proposed algorithm.To assess the accuracy of the classifier, sensitivity, positive predictive accuracy and total accuracy have been calculated.These are defined as follows: Here, TP is the number of true positive detections, FN stands for the number of false negative detections, and FP stands for the number of false positive misdetections.

A Novel technique for identifying patients with ICU needs using hemodynamic features
Modern ICUs are equipped with a large array of alarmed monitors and devices which are used in an attempt to detect clinical changes at the earliest possible moment, so as to prevent any further deterioration in a patient's condition.The effectiveness of these systems depends on the sensitivity and specificity of the alarms, as well as on the responses of the ICU staff to the alarms.However, when large numbers of alarms are either technically false, or true, but clinically irrelevant, response efficiency can be decreased, reducing the quality of patient care and increased patient (and family) anxiety (Laramee, Lesperance et al. 2006).
Medical and technical progress has extended the therapeutic possibilities of ICUs tremendously.A multitude of devices is available for monitoring and treatment in an individual assembly according to the requirements of the situation (Friesdorf, Buss et al. 1999).Due to limited physiological monitoring and a patient's individual pathophysiology, intensive care medicine has to cope with a high amount of uncertainty.Unusual circumstances caused by patients, clinicians and technology occur frequently and must be controlled and managed adequately to prevent a bad outcome and to achieve system reliability (Friesdorf, Buss et al. 1999).
Cao et al. (Cao, Eshelman et al. 2008) have used ICU minute-by-minute heart rate (HR) and invasive arterial blood pressure (BP) monitoring trend data collected from the MIMIC II database to predict hemodynamic instability at least two hours before a major clinical intervention.They derived additional physiological parameters of shock index, rate pressure product, heart rate variability, and two measures of trending based on HR and BP and they applied multi-variable logistic regression modeling to carry out classification and implemented validation via bootstrapping, resulting in 75% sensitivity and 80% specificity.Eshelman et al. (Eshelman, Lee et al. 2008) have developed an algorithm for identifying ICU patients who are likely to become hemodynamically unstable.Their algorithm consists of a set of rules that trigger alerts and uses data from multiple sources; it is often able to identify unstable patients earlier and with more accuracy than alerts based on a single threshold.The rules were generated using the machine learning techniques of support vector machines and neural network, and were tested on retrospective data in the MIMIC II ICU database, yielding a specificity of approximately 90% and a sensitivity of 60%.
Several investigations have been reported in the literature in the area of cardiovascular fault diagnosis using hemodynamic features.Javorka et al. (Javorka, Lazarova et al. 2011) compared heart rate and blood pressure variability among young patients with type I diabetes mellitus (DM) and control subjects by using Poincare plots, which are the standard tools of nonlinear dynamic analysis.They found significant reduction of all HRV Poincare plot measure in patients with type I diabetes mellitus, indicating heart rate dysregulation.
The study carried out by Pagani et al. (Pagani, Somers et al. 1988) concerned patients suffering from hypertension.They showed that baroreflex gain decreases with the presence of hypertension.Blasi et al. (Blasi, Jo et al. 2003) studied the effects of arousal from sleep on cardiovascular variability.They performed time-varying spectral analyses of heart rate variability (HRV) and blood pressure variability (BPV) records during acoustically induced arousals from sleep.They found that arousal-induced changes in parasympathetic activity are strongly coupled to respiratory patterns, and that the sympathoexcitatory cardiovascular effects of arousal are relatively long lasting and may accumulate if repetitive arousals occur in close succession.
Advances in knowledge-based systems have also enhanced the functionality of intelligent alarm systems and ICU needed patient detection.Using the knowledge of a domain expert to formulate rules or an expertly classified data set to train an adaptive algorithm has proven useful for intelligent processing of clinical alarms (Laramee, Lesperance et al. 2006).
Expert systems such as neural network (Westenskow, Orr et al. 1992), knowledge based decision trees (Muller, Hasman et al. 1997;Tsien, Kohane et al. 2000) and neuro-fuzzy systems (Becker, Thull et al. 1997) that encode the decisions of an expert clinician all show significant statistical improvement in the classification of alarms and ICU needed patients.Singh et al. (Singh and Guttag 2011) proposed a classification algorithm based on a decision tree method for cardiovascular risk stratification.They have shown that the decision tree method can improve performance of the classification algorithm.They have reported that the decision tree models outperform the radial basis function (RBF) kernel-based support vector machine (SVM) classifiers.Timms et al. (Timms, Gregory et al. 2011) have used a Mock circulation loop for hemodynamic modeling of the cardiovascular system in order to test cardiovascular devices, which are used in the ICU and can provide a better indication of patient's condition for nursing staff.Also, Laramee et al. (Laramee, Lesperance et al. 2006) have described an integrated systems methodology to extract clinically relevant information from physiological data.Such a method would aid significantly in the reduction of false alarms and provide nursing staff with a more reliable indicator of patient condition.
Several studies have focused on an effort to find a suitable classifier structure.Ghorbanian et al. (Ghorbanian, Jalali et al. 2011) proposed an algorithm based on a neural network classifier for heart arrhythmias detection.Their results show that the multi-layer perceptron neural network (MLPNN) structure is a strong and precise classifier.However, they used several pre-processing techniques in their algorithm to improve the performance of the NN classifier.Acharya et al. (Acharya, Bhat et al. 2003) proposed an algorithm based on a neural network classifier and fuzzy cluster for classification of heart arrhythmias.They compared these two classifiers and they reported that the fuzzy cluster is a better classifier in comparison with the neural one.Also, Ozbay et al. (Ozbay, Ceylan et al. 2006) proposed a comparative study of the classification accuracy cardiovascular diseases using a well-known neural network architecture, MLP structure, and a new FCNN for early diagnosis.Based on their test results they suggested that a new proposed FCNN architecture can generalize better than ordinary MLP architecture and also learn better and faster.
The method for classification of subjects into two categories of normal and abnormal subjects, as described in this paper, is based on the hypothesis that there should be differences between the hemodynamic data collected from normal subjects and abnormal patients.This hypothesis is constructed on the same foundation as all developed scoring methods for ICU patients.The idea behind all patient scoring methods in ICU is that critically ill patients in ICU are typically characterized by disturbance of the body's homeostasis.These disturbances can be estimated by measuring to what extent one or many physiologic variables differ from the normal range (Lacroix and Cotting 2005).

Methodology
While the proposed method in this paper shares some fundamental ideas with traditional scoring methods, it differs from them in two key areas.The first difference comes from fact that the patient scoring methods are based on the wide variety of data ranging from cardiovascular and respiratory systems to neurologic and renal systems variables.However, in our method we use a small subset of hemodynamic data, namely, HR and systolic blood pressure (SBP).The principal objection to this could be that such a small amount of data could be insufficient for identifying the patient state; the answer to this objection leads us to the second major difference of the proposed method with the scoring methods.Scoring methods just look at the data as they are being collected in the ICU, and ignore information hidden in the different time scales.In our proposed method on the other hand, this hidden information is extracted which can be expected to give us better insight into the patient's physiological condition.
The data used in this study is collected from the Physionet database.Data are collected from two databases: MIT-BIH Polysmonographic and MIMIC II databases within Physionet archive.Twenty five subjects from these databases were collected for training.For each subject, ECG signal and blood pressure waveform, in a five-hour range of the total data were collected.For the first part of the study, the HR and SBP series for each subject are derived from ECG and arterial pressure waveforms respectively.
The algorithm of the developed method of this study is shown in Figure (10).According to the proposed algorithm, in the first step and after collecting the data, four features which highlight the differences between normal subjects and patients, are extracted from data.We then define four criteria based on the extracted features.These four criteria which form the basis of our classification algorithm are: circle criterion, estimation error criterion, Poincare care plot deviation, and autonomic response delay criterion.In the next step and for the task of classification, we define three groups; namely, healthy, high risk and patient.Then we design three fuzzy membership functions for each criterion to find the subject degree of membership to each group.Finally, a scoring method is developed based on the degree of membership of each case, and subjects are classified based on this scoring method.
In the following sections, we provide a step by step description of our method, beginning with the definition of the proposed criteria.In the test stage subjects will be divided into three predefined groups of healthy, high risk and patient, based on their assigned score.

Circle criterion
To evaluate the differences between healthy and patients, the SBP against HR diagram for each subject is plotted.Figure 11 shows these plots for healthy and patient cases.Clearly, the plots show a significant difference between normal subjects and abnormal patients: the data for normal subjects are concentrated, while those of the patients are scattered.
The mean value of SBP and HR for each normal subject and abnormal patient is then calculated and plotted in one diagram.Figure 12 shows the mean values for all the subjects in one diagram.The principal difference between the two groups is quite clear.This diagram reveals the fact that there are differences between the HR and SBP data in normal subjects and abnormal ones.The plot shows that the data for the normal subjects is clustered and limited in a specific area, while those of the patients are spread out through the whole plot.The first criterion is named the "circle criterion".The center of the circle is located at point "O" where its coordinates are the mean values of HR and SBP of normal patients and, in this case, is (83,120).The radius of this circle is calculated based on Euclidian distance between the center and the outer limit of the circle.
A given subject would be considered to be a patient if its corresponding means (HR, SBP) point is out of the healthy subject's circle (the limited area).

Estimation error criterion
As the second feature, a system identification method is used for the prediction of the next HR based on the current and previous HR and SBP data.A Nonlinear ARX or NARX model is employed to estimate HR series (Jalali, Ghaffari et al. 2011).NARX models in general are represented by the following equation: where, y(t) and u(t) are the output and input of the system, respectively.In Eq. ( 1) the matrix [n n n ] is the same as the order of the model.Model order is selected by use of the A-Information Criterion (AIC) method.This is the traditional method for model order selection in cardiovascular system identification research.Model order for data in this research has been calculated to be [ 96 ].
In this criterion, Artificial Neuro Fuzzy Inference System (ANFIS) structure is employed for the identification.The model has 15 inputs and one output.Membership functions for inputs are designed based on physiological facts.Since the nervous system consists of sympathetic and parasympathetic nerves, for each input, two generalized bell-shaped membership functions are assigned to designate the sympathetic and parasympathetic functions.
The system identification results are described in Table 4.The results in this table show that differences exist in the normalized root mean square error (NRMSE) with respect to the estimation of the HR for the two groups under study.In particular, the results indicate that NRMSE is smaller for normal subjects than for patients.These differences are due to the fact that the model is designed for normal subjects; thus, the output of the model for patients have higher errors than for normal subjects.Based on these results and noting that the maximum error for healthy subject is 0.238, while the minimum error for patient is 0.263, we define a second criterion called "estimation error criterion".According to this criterion, the subject would be flagged as abnormal if the calculated error in HR estimation raise is more than 0.25.

Poincare plot deviation
A Poincare plot, named after Henri Poincare, is used to quantify self-similarity in processes which are usually characterized by periodic functions.This plot is commonly used in heart rate variability (HRV) analysis.The Poincare plot is a graph in which each heart rate episode is plotted as a function of previous HR, and then the line y=x is fitted to the data.In (Javorka, Lazarova et al. 2011) this method is also applied to classify patients with type I DM from healthy subjects.Drawing the Poincare plot for healthy and abnormal subjects, it is found that the deviation from the mentioned line in healthy subjects is less than in abnormal subjects.These plots are shown in Figure 13.
The deviation from the line y=x in the Poincare plot for the two groups under study is shown in Table 5.Therefore, we define the third criterion using this deviation to characterize abnormality.Based on this criterion, subjects would be called abnormal If deviation from line y=x is more than 15%.

Autonomic response delay criterion
The normally occurring delay in the autonomic response to a stimulus has its origins in the parasympathetic nervous system.Calculating the delay for healthy subjects and patients we can infer that response delays in abnormal subjects are remarkably higher than healthy subjects.The results of calculating the delay in the autonomic response are shown in Figure 14.Fifteen abnormal patients and ten healthy subjects were involved in the training group.

Fig. 14. Delay in autonomic response
The results of the delay calculations in the autonomic response are also represented in Table 6.Based on the above results, we define the fourth criterion where the subject is characterized as abnormal if the calculated delay in the autonomic response increases to more than 0.021 second.

Group
Mean Delay (sec) Max Delay (sec) Healthy 0.015 0.02 Patient 0.038 0.06 Table 6.delay in autonomic response for two groups After deriving the four criteria discussed above, an algorithm is designed to classify healthy subjects from patients.In the following section we describe the proposed algorithm.

Scoring method and classification algorithm
Based on the evaluated criteria from training data, an algorithm is developed to automatically distinguish patients from healthy subjects.The algorithm is based on a fuzzy decision making method.First, for each criterion, three Gaussian bell membership functions are designed as an indicator of three major groups: healthy, high risk and patient.Since this algorithm is designed for clinical use and since there exists a high degree of uncertainty in clinical applications, we added the high risk groups to our predefined healthy and patient groups to account the cases that do not completely belong to the healthy or patient groups.
For the training part we first made a general guess for the shape of the membership functions.The membership functions during the training round then adapt their shape parameters to the incoming data for best classification performance.Now the classifier is designed and ready for the testing stage.Figure 15 represents the adapted membership functions for each criterion based on the training data.
To test the developed algorithm, in the first step for each subject, all the mentioned features that form the basis of four criteria are extracted and used as an input for the four abnormality criteria.Then, for each criterion, the subject's degree of membership to all groups is evaluated.In this step, for each subject, we have 12 degrees of membership to the designed three groups, meaning four degrees of membership for each group.After evaluating the degree of memberships, the cumulative sum of the four degrees of membership of each group will be calculated.In this stage we have three numbers indicating subject's degree of membership to each group.We call these numbers the subject's "score" for each group.A given subject will belong to the group whose score is the largest.
Fig. 15.The designed membership functions for each criterion

Results
From a total of seventy subject data which were collected from MIMIC II database, the algorithm was first trained with twenty five subjects including ten healthy and fifteen patients.The training data was selected randomly to avoid bias toward a specific disease.Then, three groups of subjects were tested, each group with four healthy individuals and eleven patients.
The proposed method was applied to 45 cases from Physionet database, containing 12 healthy subjects and 33 patients.From all cases, 37 cases were accurately detected, while there was one false detection.Furthermore, in five cases, a patient subject was classified as high risk and, in two cases, a healthy subject was classified as high risk.
Here, TP is the number of true positive detections, FN stands for the number of false negative detections, and FP stands for the number of false positive misdetections.

Conclusion
Physiological time series, including hemodynamic and electrophysiological data clearly represent the physiological state of subjects in a medical environment.Automatic detection of heart arrhythmias could be very important in clinical usage and lead to early detection of www.intechopen.coma fairly common malady and could help contribute to reduced mortality as cardiovascular disease remains the leading cause of death around the world.Hemodynamic instability is most commonly associated with abnormal or unstable blood pressure (BP), especially hypotension, or is more broadly associated with inadequate global or regional perfusion.Inadequate perfusion may compromise important organs, such as heart and brain, due to limits on coronary and cerebral autoregulation and cause life-threatening illnesses or even death.Therefore, it is crucial to identify patients who are likely to become hemodynamically unstable for an early detection and treatment of these life-threatening conditions.
In the first example of this study, the use of neural networks for classification of the ECG beats is presented.Several stages of pre-processing have been used in order to prepare the most appropriate input vector for the neural classifier.ECG signal baseline wandering is one of the most critical problems for neural classifiers, since it causes virtual morphological differences between same types of ECG beats.In this example, this wandering is removed by application of a signal filtering method which leads to better results.As the performance of the computerized ECG classification algorithms depends on the selection of the ECG features, continuous wavelet transform, which performs better than other methods, is used to extract appropriate features.Also, data dimensionality reduction is one of the most important ways of improving neural classification, since large volume of data causes problems for neural network classifier performance, and reduction in the data size is necessary for better performance of the classifier.Therefore, principal component analysis is used to achieve dimensionality reduction.Results show that PCA is more effective than other reported methods.The performance of the proposed algorithm has been shown to be reasonably acceptable and ECG beat detection and classification has been achieved.Compared to other reported work in this field, the presented algorithm shows reasonably accurate results in the field of heart arrhythmia detection.
The main advantage of this example is that, by using ten scales in computing CWT of signals, the morphological differences between several types of ECG signal are highlighted and the extracted features show the differences more clearly.Another advantage of this example is that the reduction of the dimension of data by applying PCA led to the most appropriate input vector for neural network classifier which improved the performance of the neural network classifier significantly.The main achievement of this algorithm is that the classifier in this example detects 6 types of ECG signals which include normal beats and 5 types of arrhythmia beats.Even though the number of ECG signal types considered in this example is much larger than the typical number of ECG signal types in other studies in this field, the classification results lead to a reasonably good performance.
In the second example of this study, a scoring method based on fuzzy logic and feature extraction is proposed to distinguish patients from healthy subjects.The method is based on the same principle that the ICU scoring methods follow: that of finding differences between hemodynamic data of healthy subjects and patients.Four different criteria are proposed to detect and identify patients from a group of subjects.For each criterion a fuzzy classifier is designed such that the individuals are classified into the healthy, high risk and patient fuzzy groups.In other words, a given person may have a membership grade in all three classes.A score is assigned to the subject for that group which is defined as the sum of degree of memberships to one group for different criteria.The algorithm calculates a combined criterion based on the results of the four criteria to arrive at a classification decision for each individual.
It is shown that the algorithm is highly reliable and has been able to detect correctly all members of the first group.It is also been able to detect all eleven patients in each of the next two groups correctly.Only one of the healthy members in the second and third was classified as high risk.In this example, four different criteria were proposed and used in the proposed algorithm in order to detect the abnormalities in testing subjects.From each testing subject, various features were extracted and used as input for the criteria, and based on the results of all four criteria, a decision was made about the type of subject, as to whether he/she is normal, high risk or a patient.The proposed algorithm gave reliable results in detecting the ICU needed patients but still needs to be improved.The difference between the proposed method in this example and other similar research in this field of study is that by using the presented algorithm in this example, existence of any abnormality in a patient will be found, while in most similar studies in this area, a specific abnormality is found in a patient or among a database of subjects.Therefore, our results are more general and more useful from the point of view of clinical applications.This method tends to be more detective rather than predictive, and this could be one drawback of the algorithm.
Further investigations need to be carried out to render the algorithm more predictive.
Figures 3.a and 3.b show raw ECG signal of records 232 and 208 from the MIT-BIH database, each of which clearly exhibit baseline wandering.Figures 3.c and 3.d show the same ECG signals after applying the filtering method.It is clear that the baseline wandering has been removed, leading to a better performance of the neural classifier.For the stage of sample selection, the suitable range of samples from the raw ECG signal was found experimentally to be 150 samples after the R wave for all types of signals, which together comprise what we call a segment.These segments are found to be an appropriate range of ECG signals which represent morphological differences between different types of ECG beats and include sufficient amount of data needed for classification of heart arrhythmias.For three types of ECG signals under study, the morphologies of ECG beats are shown in Figures 4.a -6.a; Figures 4.b -6.b show the selected segments of these beats.

Fig. 10 .
Fig. 10.Schematic of the proposed algorithm.The proposed algorithm consists of two stages: training and testing.In the training stage 25 subjects' data are used to extract features to classify patients from healthy subjects.In the test stage subjects will be divided into three predefined groups of healthy, high risk and patient, based on their assigned score.

Fig. 11 .
Fig. 11.SBP against HR for a healthy (left) and an abnormal (right) case

Fig. 13 .
Fig. 13.Poincare plots of HR for two healthy (up) and two abnormal (down) cases.The Poincare plot is a plot of HR(n+1) vs. HR(n).Line y=x is illustrated in all pictures.

Table 1 .
Variation of classification accuracy with respect to the number of selected PC vectors www.intechopen.comTheCardiovascular System -Physiology, Diagnostics and Clinical Implications 224

Table 2
shows the result of classification by the neural network.It can be seen from this table that from the whole testing data base, the classification fails only in 5 cases.According to this table, the algorithm achieves a good performance with 99.5 % Se, 99.66% PPA and 99.17% TA.

Table 2 .
Results of the algorithm on MIT-BIH databaseA comprehensive comparison between results from different studies in the field of specified ECG beat classification is very difficult since the database, signals under study, the number of arrhythmias in classification, the algorithm structure, and the data processing methods are not the same in the various studies.However, in order to present an estimate of the performance of our algorithm and our classifier we show the results of this study versus the reported results of other well-known studies in the area of selected heart arrhythmias detection in Table3.As seen from this table, the algorithm in the present study shows

Table 3 .
Comparison of several classifier performances on MIT-BIH database (Blank boxes have not been reported

Table 4 .
Error estimation for identification of HR baroreflex

Table 5 .
Deviation from line y=x in Poincare plot

Table 7 .
Table (7)shows the overall result of the classification for all 45 cases of the 3 groups.The FP is the healthy subject who is misclassified as a high risk subject and FN is the patient who is misclassified as a high risk subject.According to this table, the scoring method of the proposed algorithm results in 86% sensitivity, 94.8% positive predictive accuracy and 82.2% total accuracy.Results of testing the algorithm on Physionet database A comprehensive comparison between the results of different studies in the field of identifying ICU needed patients by the use of hemodynamic features is very difficult since the database, signals under study, the algorithm structure, and the data processing methods are not the same in the various studies.However, in order to present an estimate of the performance of our algorithm and our classifier we show the results of this study versus the reported results of two other well-known studies in the area of ICU needed patients identifying in Table8.As seen from this table, the algorithm in the present study shows reasonably accurate results, and compares favorably with other studies.The goal of this study, which was identifying patients with ICU needs by use of the hemodynamic features, has clearly been achieved.

Table 8 .
Comparison of several classifier performances on MIMIC II ICU database (Blank boxes have not been reported)