On the Projection Matrices Influence in the Classification of Compressed Sensed ECG Signals

In this paper the classification results of compressed sensed ECG signals based on various types of projection matrices is investigated. The compressed signals are classified using the KNN (K-Nearest Neighbour) algorithm. A comparative analysis is made with respect to the projection matrices used, as well as of the results obtained in the case of the original (uncompressed) signals for various compression ratios. For Bernoulli projection matrices it has been observed that the classification results for compressed cardiac cycles are comparable to those obtained for uncompressed cardiac cycles. Thus, for normal uncompressed cardiac cycles a classification ratio of 91.33% was obtained, while for the signals compressed with a Bernoulli matrix, up to a compression ratio of 15:1 classification rates of approximately 93% were obtained. Significant improvements of classification in the compressed space take place up to a compression ratio of 30:1.


INTRODUCTION
In the last decade, a new concept regarding the acquisition, analysis, synthesis and reconstruction of signals was introduced.Known under several equivalent names: compressed/compressive sampling or sensing (acquisition/detection by compression), it speculates the sparsity of various classes of signals with respect to certain basis or dictionaries.In the following we refer to a signal f (including a biomedical one) which is a member of a class F  R N of ND discrete signal, in particular 1D temporal or 2D spatial signals (images).We ask the question of correlating the properties of the class F to the minimum number of measurements necessary for coding the signal f with a Euclidean metric recovery error, , imposed, respectively ||ff  || l2 .The compressed sensing concept relies on an important result obtained by Candes and Tao [1][2][3][4] namely that if the signals of the class F admit representations through a small number of components in an adequately selected base, i.e. they are sparse in that basis, it is possible to reconstruct them with a very good precision from a small number of random measurements by solving a simple problem of linear programming.Specifically, it is shown that if the the n-th component f(n) of a signal in a given base, whose values in descending order satisfy the relation |f|(n) ≤ Rn -1/p with R,p > 0 (which represents a constraint on the descending speed of the components) and K measurements (projections) of the form yk = <X k ,f >, k=1,…,K, are performed, where X k are N-dimensional Gaussian independent vectors with normal standard distribution, then any signal that meets the mentioned constraint for a given p can be reconstructed with a very high probability in the form of a f # signal defined as a solution of minimum norm l 1 of the system yk = <Xk,f # > with the relationship The result is optimal in the sense that it is generally impossible to obtain a better precision out of K measurements regardless of the mode in which these measurements are performed.
Reformulating the main problem, the situation can be regarded as the one of recovering a signal fR N using a minimum number of measurements, i.e. of linear functionals associated to the signal, so that the Euclidean distance l 2 between the initial and the reconstructed signal to be lower than an imposed value .

II. METHODOLOGY AND OBJECTIVE
Assuming the existence of a dictionary D of elements ) belonging to C N that will be called atom.The dictionary contains L vectors and can be viewed as a matrix of size NxL.An example is the Coifman dictionary which contains L=NlogN elements consisting of attenuated harmonic waveforms of various durations and localizations.Other types of dictionaries are those proposed by Ron and Shen [5] or the combined ridglet/wavelet systems proposed by Starck, Candes and Donoho [6].
For a given sparse signal where the norm l 0 is the number of non-zero elements in .Unfortunately the problem is rarely easy to solve.Since in general L>>N the solution is not unique.Determining the solution of the problem (P 0 ) requires enumerating all subsets of the dictionary and finding the smallest subset which can be able to represent the signal.
A remarkable result [2] is that for a large number of dictionaries, the determination of sparse solutions can be achieved based on the convex optimization, respectively by solving the problem Intuitively, using the norm l 1 can be regarded as a convexification of the problem (P 0 ).The convex optimization problems are well studied and there are numerous algorithms and software; as already mentioned, the problem (P 1 ) is a linear programming problem and can be solved by interior point type methods even for large values of N and L. The possibility of solving a problem P0 by solving problem (P 1 ) may seem surprising.However, there are results which ensure in a rigorous manner the fact that, if there is a highly sparse solution for the problem (P 0 ) then it is identical to the solution of the problem (P 1 ).Conversely, if the solution of the problem (P 1 ) is sparse enough, i.e., if the sparsity degree is below a certain threshold, then it is ensured the fact that this is also the solution for the problem (P 0 ).
In order to obtain the representation of the signals in overcomplete dictionaries several methods have been proposed in the past few years, such as the "method of frames", "matching pursuit", "basis pursuit" (BP), as well as the "method of best orthogonal basis" [2].
A possibility of improving the results of the reconstruction when using the concept of compressed sensing is to use specific dictionaries, constructed according to the nature, particularities, statistics or the type of the compressed signal.Thus, there are algorithms [7] which on reconstruction will use a certain dictionary selected from a series of several available dictionaries, namely, the dedicated dictionary constructed for that particular class of signals.These types of reconstruction algorithms have the advantage of a good reconstruction, but they require additional information related to the initial signal, based on which it will be decided on the dictionary used on reconstruction.A solution to this problem would be the correct classification of the original signal or of the compressed signal.For biomedical signals this classification of the signal involves placing the signal into one of several predefined pathological classes for which there exist specific dictionaries.In practical applications, this classification of the original signal is not possible or it requires an additional effort.Therefore, the ideal solution (which does not require an extra effort in the compression stage) is to classify the compressed signal during the reconstruction stage.In other words, for the classification of the compressed signal [10], the problem of classification is moved from the compression stage into the reconstruction stage [8].
In this paper we investigate the possibility of classification of the ECG signals after their compression based on the concept of compressive sensing.In order to obtain good results both from the classification point of view and from the point of view of the reconstruction, we will segment the ECG signal into cardiac cycles which will be further compressed.In other words, ECG segments will be used (cardiac cycles) and the ECG signal will be reconstructed by concatenating these cardiac segments (cycles).According to the algorithm described in [9] the segmentation of the ECG signal into cardiac cycles is achieved based on the R waves detection.Thus, one cardiac cycle is represented by the ECG signal between the middle of a RR segment and the middle of the next RR segment, where the RR segment means the ECG waveform between two successive R waves.Figure 1 represents the segmentation of the ECG signal.After the segmentation of the ECG signal there is a centering of the R wave which is made by resampling on 150 samples on both sides of the R wave.In this way all cardiac cycles will have size 301 and the R wave will be positioned on the sample 151 [9]. Figure 1.Segmented ECG signal [9] In order to compress the signals obtained this way, based on the concepts of compressed sensing, a KxN projection matrix of measurements has been used.The compression ratio depends on the value of K. Due to the fact that the original ECG segments have the size of 301 (because there was a resampling of the cardiac cycles and all cycles have been resampled on 301 samples), the projection matrix will have one of the dimensions 301, N = 301, and the other dimension of the matrix, K, will represent the number of measurements.Thus, if the projection matrix has the size 20x301, it means that for the compression of any cardiac cycle of size 301 only 20 measurements will be taken, resulting a compressed version of any cardiac cycle of size 20, which means a compression ratio of 15:1.
For the classification of the compressed cardiac cycles we used the KNN classifier with an Euclidean distance type, and www.ijacsa.thesai.org the decision of belonging to a certain class was based on the nearest neighbor.
A data set of 5601 compressed cardiac cycles, 701 cardiac cycles from each of all the 8 classes (normal and 7 pathological classes) was constructed.
In order to train the KNN classifier we used 1500 cardiac cycles, the testing being made on the rest of the data from the database.
We tested several types of projection matrices (Gaussian random, Fourier, random with elements of -1, 0, 1, etc).Together with the type of matrices, the number of measurements was varied from 2 to 60 (equivalent to compression ratio between 150:1 and 5:1).Thus, using different types of matrices, an analysis of the classification of the compressed cardiac cycles for various compression ratios was performed.
The following types of matrices were used:  Random projection matrix (marked on graphs with random): all entries of the K × N projection matrix are independent standard normal distributed random variables.
 Matrices with zeros and ones, with a predefined number of ones (3,5,7,10,50   Random Fourier matrix: The signal is a discrete function f on Z/NZ, and the measurements are the Fourier coefficients at a randomly selected set of frequencies of size K (K < N).
 Random projection matrix with 0 and 1 (marked on graphs with V_0_1_random): all entries of the N × K projection matrix are independent standard normally distributed random variables.

III. EXPERIMENTAL RESULTS AND DISCUSSIONS
A number of 24 ECG annotated recordings from the MIT-BIH Arrhythmia database have been used to test the possibility of the classification of compressed patterns [30].The ECG signals were initially digitized through sampling at 360 samples per second, quantized and encoded with 11 bits and then resampled as described above.
Based on the database annotations, eight major classes have been identified, namely a class of normal cardiac beats and seven classes of pathological beats: atrial premature beat, left bundle branch block beat, right bundle branch block beat, premature ventricular contraction, fusion of ventricular and normal beat, paced beat, fusion of paced and normal beat.
For the resampled cardiac cycles, but without compression, using for training 1500 cycles and using the KNN algorithm, we found a classification ratio of 91.33%.
In Figure 2 the classification curves for various projection matrices are represented.Very good results have been obtained for the Bernoulli matrix, namely for projection matrices with values of -1, 0 and 1, in equal proportion (⅓,⅓,⅓) or variable proportions (¼, ½ , ¼).Also, very good results were obtained for the projection matrix containing only the elements of 0 and -1, in equal proportions (½ and ½), which, in fact, is a custom Bernoulli matrix.
From the point of view of the results, the second best projection matrix is random with independent standard normal distributed random variables entries.
The weakest results are obtained with the matrix containing values of 0 and -1, with a number of 5 non-zero elements.The difference between the results obtained with this matrix and the next matrix from the classification point of view are high, namely from 50% in case of a compression of 30:1 obtained with the matrix V-1_5, to approximately 70% for compression of 30:1 with the Fourier matrix.
It is also observed that for a compression ratio lower than 20:1 the results of the classification do not improve significantly, i.e. one observes a stabilization of the classification ratio.Also, between the compression of 20:1 and 30:1 the improvement of the classification ratio is small, therefore choosing the classification ratio will be based on the sparsity of the signal, which will implicitly influence the reconstruction errors also.
Another aspect to be mentioned, and which is especially important for hardware implementations of compressed sensing devices, is that in the case of projection matrices which contain only elements of -1, 0 and 1 there is the advantage of reducing the number of calculations required for compression.If in the case of random matrices used for compression a significant number of multiplications is necessary, for matrices with elements -1, 0 and 1 (Bernoulli matrices) we need only a small number of additions.www.ijacsa.thesai.org

IV. CONCLUSIONS
This paper presents a comparative analysis of the classification results for compressively sensed cardiac cycles, using different project matrices and a variable number of measurements.
The classification of cardiac cycles is made using the KNN algorithm and the construction of the projection matrices is varied, including random matrices with real numbers, Bernoulli matrices, random matrices with elements of -1, 0 and 1 with different probabilities, random matrices with values of 0 and 1 and normal distribution, etc.
For Bernoulli projection matrices it has been observed that the classification results for compressed cardiac cycles are comparable to those obtained for uncompressed cardiac

Classification %
compression ratio of 20:1 compression ratio of 30:1 compression ratio of 60:1 www.ijacsa.thesai.orgcycles.Thus, for normal uncompressed cardiac cycles a classification ratio of 91.33% was obtained, while for the signals compressed with a Bernoulli matrix, up to a compression ratio of 15:1 classification rates of approximately 93% were obtained.
Significant improvements of classification in the compressed space take place up to a compression ratio of 30:1.
the determination of the vector of coefficients  with the highest number of null elements belonging to C L so that S D   is envisaged.www.ijacsa.thesai.orgFormally the problem consists of solving the optimization problem:

Figure 2 .
Figure 2. The compression ratio vs. classification% for various projection matrices