Premature Ventricular Contraction Recognition using a Fuzzy Maximum Approaching Degree

. This work presents a new methodology for ventricular premature contraction arrhythmias recognition using a set of geometrical attributes recently proposed and a fuzzy maximum approaching degree. Pattern models based on triangular and trapezoidal membership functions are proposed and a committee comprising these functions is composed using some statistical data, beyond a mechanism for manual selection of attributes and automatic weighting for each attribute. The obtained results show the efficiency and validity of the proposed approach, with 99.07%, 98.36% and 99.79% of accuracy, sensibility and specificity, respectively, as good as the ones obtained by the state-of-art methods.


INTRODUCTION
The heart acts as a pump, receiving rich carbon dioxide blood from the circulatory system by the right atrium. This blood is sent to the lungs by the right ventricle. Then, it is oxygenated and ejected to the left atrium, and after to the left ventricle, which sends it again to the circulatory system through the aorta artery (Guyton, 2006).
The increased mortality in patients for treatment of premature ventricular contraction (PVC) is associated to the increased mortality in patients for treatment of acute myocardial infarction (AMI).
The ECG records the electrical activity of the heart. It is a stochastic signal formed by characteristic waves: P, Q, R, S and T, where P waves and QRS complex discriminate atrial and ventricular depolarization, and T wave reports ventricular repolarization (Latchamsetty;Bogun, 2015). A PVC occurrence changes, the ECG waveforms. Therefore, by analyzing such changes it is possible to detect their occurrence.
Due to the large amount of data to be analyzed and the variability of PVC patterns, the use of intelligent mathematical computational tools is extremely necessary to assist the expert in the diagnostic.
In this work, a new approach is presented for PVC recognition, combining the geometrical features porposed in Abreu;Vieira Filho, 2019) and the Fuzzy maximum approaching degree.
The remainder of the text is organized as follows: in the section 1, some fundamentals of Fuzzy logic are listed; methods for PVC recognition are described in section 2; the proposed approach is presented in section 3; results and discussions are described in section 4, and finally conclusions are presented in section 5.

Fuzzy Patterns Recognizing
Fuzzy logic is a system of reasoning and computation in which the objects of reasoning and computation are classes with limits not defined (Zadeh, 2015). In order to describe certain related phenomena the term"degree"has been used, representing partial qualities or truths or even standards of the best (Barros;Bassanezi, 2006). Fuzzy sets, defined by Zadeh, associate an object membership grades to the set. In the classical or crisp case, when ∈ {0, 1},the correspondent fuzzy set is µ ∈ [0, 1]. Membership functions characterize the system and can be generalized in a way that values attributed to elements in the universal set are within a specific range, indicating these elements relevance grade to the considered set. The most common membership functions are triangular and trapezoidal (Ross, 2017).
Pattern recognition is understood as a process of identifying structures, through comparisons to a previously known structure. The dataset for pattern recognition can be divided into two subsets: training and testing. Training subset is used to establish the parameters of the model used in the pattern recognition, while test subset serves to validate the obtained model.
Patterns are expressed as fuzzy sets ̃1 ,̃2, . . . ,̃. When a recognition system receives an attribute characterized by the crisp value 0 , using the maximum membership criterion, a pattern will be associated to 0 if Equation (1) is satisfied (ROSS, 2017): i.e., 0 means the greatest membership among all the patterns membership.
In pattern recognition applications, the dimension of the attributes space is greater than one, therefore, each set of fuzzy patterns is defined as a collection of crisp values, such as ̃= { 1 , 2 , … , } where is the amount of attributes, = {1, 2, … , } and is the number of classes in which the patterns are classified.In this approach it is common to introduce factors ,weighting the importance of the attribute ̃ to the pattern, such that ∑ = 1 =1 , ∀ (Ross, 2017).
Therefore, using a maximum-degree approach, given a pattern ̃= { 1 , 2 , … , } and classes, a maximum membership is given by i.e., for each j class it is obtained the sum of memberships, computed for a given attribute , weighted by . The greater from theses sums is related to the class that pattern ̃ resembles more. It is important to note that µ̃( ) is a crisp singleton.

State of the art
In this section some PVC recognition methods are described, aiming to provide an overview of the propositions employed to this problem solution.
The energy in each QRS is computed getting the maximum for each scale, i.e., = max{ , } and it is then normalized, obtaining an energy cumulative distribution: . Therefore, vector [ 1 , 2 , … , ]forms the space of attributes for different heartbeats. In this space, the centroids for each class are obtained using the Fuzzy c-Means (FCM) clustering method. In this way, in order to recognize a new pattern, authors implement a minimum distance measure between the centroid and the pattern.
Also using the wavelet transform, Shyu et al., 2004 proposed the computation of only two attributes: QRS complex area and duration, computed using wavelet coefficients in the scales 3 and 4, respectively. These attributes are provided as input for a four-layers fuzzy neural network: (1) membership; (2) rules; (3) hidden and (4) output. In the second layer, composed by six nodes, three distinct gaussian models were implemented as membership functions, one for normal class, one for PVC class, and one for the Zero class, where functions parameters were set analyzing the attributes average ( ) and standard deviation ( ) using recordings 116 and 111 from MIT/BIH database (Goldberger, 2000) for each heartbeat pattern. However, for the zero membership function, parameters were combined as follows: = ( 1 + 1 + 2 − 2 )/2 and = ( 1 + 2 )/2, where indexes 1 and 2 are respectively related to normal and PVC classes. Authors Shyu et al. (2004) still proposed a five-node hidden layer, which connects the rules layer to the output layer. The output layer contains two nodes, those nodes provide the prediction probability for each class.
In Yeh et al. (2010), a method called fuzzy cmeans (FCM) is proposed to classify cases of heartbeat (ECG) signals. The proposed FCM consists of four main stages: (i) QRS extraction stage (Procedure-DOM) to detect the QRS waveform using the difference Operation method; (ii) qualitative characteristics stage (Procedure-ROM) o select qualitative resources using the band overlap method on ECG signals; (iii) Procedure-CCC is used to calculate the cluster center for each class; and (iv) procedure-HCD is used to determine the heartbeat case for the patient. ECG signals at MIT-BIH arrhythmia databases are adopted as reference data for the first two stages, and the last two stages are used to determine the heartbeat cases for the patient based on the outputs from the previous stages.

Proposed Approach
The proposed approach aims to classify heartbeats (QRS complexes) in Normal ( ) or PVC ( ) using fuzzy logic and the twelve geometrical attributes proposed by Oliveira et al. (2019), consisting in two phases, training and testing.
In the first stage, which is similar to the one employed in Yeh et al. (2010), statistics over training set are used to emulate the expert action in the knowledge basis construction. By means of the description of the values of minimum ( ), maximum ( ), average ( ), average minus, ( = − ), and average plus ( = + ), the standard deviation ( ), for each of the attributes, membership functions are built for every attribute , = 1, … ,12, using trapezoidal (TRA) and triangular (TRI) models, according to equations (3) and (4) where { , } represents the heartbeat type (class). This stage is called training phase, since in it membership functions are obtained for every attribute related to the every class.
In the second stage, the test phase, two of the membership functions approaches obtained in stage 1 are implemented. The first one is based on the maximum degree approach, described in Section 2. In the second approach, a membership functions committee is proposed. The two approaches are presented in the following.
Approach 1: Given a pattern ̃= { ,1 , ,2 , … , ,12 } related to the class, its membership is given by Equation (5), using the maximum degree approach: is the weight assigned to the membership related to the − ℎcriterion and ∈ { , } defines the membership function model. In order to identify , one has to compute the higher maximumdegree, by means of Equation (6): i.e., at the end, { , }.
Approach 2: It is noted in Equation (6) that . can be kept fixed for a comparison only related to class , or it can be got in the set { , }., resulting in a membership functions committee, since both models are used, and the one which returns the maximum between the membership functions is chosen to predict the pattern class, i.e., which is later used in Equation (6) in order to predict the class (Ross, 2017). It is noteworthy that the maximum degree based approach is dependent on the weights assigned to the membership functions for each attribute, according to Equation (5). Therefore, can be used to select the attributes that will participate in the prediction making ≠ 0 or by mitigating the relevance of certain attributes to the total pertinence, taking ≈ 0. On this last condition, since the maximum-degree approach also depends on the individual values of the relative pertinence to each class, then when  (3) and (4) are the same. So, the class prediction for an ̃ pattern is ambiguous, since the membership will be the same for both classes. This finding suggests that if the areas of the membership functions and their definition values are close to or equal, then the respective weight must be inferior to the ones belonging to the membership functions that do not overlap or have less overlap. In other words, weight can be weighted by a factor obtained from the intersection between the membership functions. Thus, initially considering = 1, ∀ , after taking the intersection between the membership functions for each class, this vector is updated by calculating and then it is normalized as Therefore, in the first stage, before executing approaches 1 and 2, weights can be modified, so that those attributes whose membership functions result in greater ambiguity (greater intersection) are attenuated.

RESULTS AND DISCUSSION
In order to test the proposed method, a first step consists in analyzing the statistics of the ECG recordings used in the cross validation experiments implemented in Oliveira et al. (2019), These data are composed by 44 recordings from MIT/BIH (Goldberger, Amaral, Glass, Hausdor, 2000), namely: 101, 106, 108, 109, 112, 114, 115, 116, 118, 119, 122, 124, 201, 203, 205, 207, 208, 209, 215, 220, 223, 230, 100, 103, 105, 111, 113, 117, 121, 123, 200, 202, 210, 212, 213, 214, 219, 221, 222, 228, 231, 232, 233, 234, with 36,468 Normal and PVC heartbeats, these latter corresponds to the real amount plus 29,526 PVC heartbeats artificially generated taking randomly the mean of two PVC patterns, in order to balance the database (Oliveira, Abreu, Duarte, Vieira Filho, 2019). Table 2 provides the obtained intervals from statistical analysis from the ECG recordings. In this training stage, for each class, 25,527 vectors of patterns are used, totaling 612,000 analyzed attributes, corresponding to 70 % of the database. Considering the 30% not used data in training stage, which are 10,928 patterns for each class, totaling 21,856 analyzed patterns, the obtained results with the proposed approach are discribed in Table 3, where all attributes were considered with the same weight. Performance measures are accuracy = ( + )/( + + + ), sensibility = /( + ) and specificity = /( + )computed from the values of true positives and negatives, and , false positives and negatives, and , respectively.       In order to verify each attribute importance in the pattern recognition, it was set = 0 in Equation (5) for the − ℎ attribute, and the classification was performed disregarding its contribution. Table 4 shows the obtained results only with the trapezoidal model, since it generates better results, where the "attribute" column assigns the excluded attribute.
It was also considered the changing of weights by calculating the intersection between the pattern membership functions in relation to the 12 implemented attributes, according to Equation (8). The obtained modified weights are described in Table 5 for each attribute and for each defined membership function model.
Using values from Table 5 new performance results are obtained, as shown in Table 6.
In general, all mentioned approaches use some transformation over the ECG signal, in order to obtain the attributes, set, except for that proposed by Oliveira et al. (2019), impacting on the computational cost.
Results in Table 3 show that the trapezoidal model had a better performance, mostly in PVC detection, i.e., greater sensibility and more true positives. However, it was only 0.01 % superior in relation to Normal heartbeats classification. It is also noteworthy that the use of both models improves only the prediction in the Normal class, since the triangular model degrades PVC class patterns predictions.
When attributes selection is considered, results presented in Table 4, related to trapezoidal model, show that 7 attribute exclusion provided accuracy and sensibility increasing in 0.59 % and 1.19 %, respectively, although specificity has worsened in 0.01 %. On the other hand, 11 exclusion caused 1.54 %, 3.08 % and 0.01 % increasing in accuracy, sensibility and specificity, respectively. By analyzing results from Table 5, it is noted that 7 attribute has the second greater weight, while 11 has the seventh. Therefore, together these results indicate that 7 exclusion improved the performance. However, it does not imply that this attribute has less informative value than the others. Because when 7 = 0, the disregarded weight is proportionally distributed to the other attributes, in this case = 0.09∀ ≠ 7, these values are greater than the ones assigned to the attributes. Thus, more weight is assigned to attributes that would have smaller weights if it was considered the intersection between membership functions (last column in Table 5), resulting in an increase in performance. The same reasoning applies to 11 . In Table 6, it is noted that performance increases of 3.21 % in accuracy and 6.62 % in sensitivity and decreases 0.2 % in specificity, for trapezoidal model, when compared to results considering equal weights. These results indicate that mitigating the attributes membership functions that generate greater ambiguity leads to less false negatives, but then increases false positives, to a lesser extent. This finding evidences that the proposed approach allows the expert to change the prediction system, so that it returns less the more falsedetections. Generally, systems that produce fewer false positives are preferred, since in positive diagnosis presence, auxiliary exams may be required for confirmation.
In Table 7 the obtained results with the proposed method, using the trapezoidal model, since it presented better results, are compared with the ones from state-of-the-art methods. In the results presented by Shyu et al. (2004) and Gharieb et al. (2016) PVC arrhythmia was also considered. Shyu et al. (2004) was worse than the proposed method in all measures and Gharieb et al (2016) was better than the proposed method in 0.93% of accuracy. However, recognition was performed over 7 and 6 recordings, respectively, and 80 heartbeats were analyzed in the second work. In addition, both approaches used the wavelet transform, fuzzy neural networks, and fuzzy clustering.
Generally speaking, in relation to the recognition system, the proposed approach is simpler than the other methods, since most of its operations are sums and products.
It can be emphasized that one advantage of the proposed method is the possibility of selection/attenuation of attributes at recognition time and its simple implementation. Therefore, an expert may verify how each attribute influences in the PVC detection, and this influence is related to morphological issues, physiological or even due to some medicine ingestion.

CONCLUSIONS
Results presented and discussed in this paper show that the fuzzy maximum-grade approaching based on geometrical characteristics extracted from QRS complexes is a suitable tool to enhance PVC-like arrhythmias diagnosis, having performed superior to the predecessor methods when a large dataset is considered.
Besides good performance, other advantage in the proposed approach is the possibility to select the attributes that will compose the prediction model, such mechanism can be used by the specialist in order to verify the contribution of a specific attribute to the diagnosis. However, the proposed approach has a drawback related to the database imbalance, compromising performance in preliminary experiments. Therefore, in future works it is intended to expand the set of attributes, obtaining more membership functions in order to better model PVC pattern variabilities, in addition to apply the proposed approach in other databases, especially those unbalanced.

CONFLICT OF INTEREST DECLARATION
The authors declare no potential conflict of interest in connection with the research, authorship, and/or publication of this article.