Early Diagnosis of Atrial Fibrillation Episodes: Comparative Analysis of Different Matrix Architectures

: This study presents three different matrix architectures for the analysis of ECG parameters, aimed at detecting atrial fibrillation episodes. The evaluation involves a cohort of 15 individuals, utilizing these matrix architectures across various orders. The findings reveal that the matrix norm delivers significantly better results compared to the large discriminant of the matrix. Detailed analysis of the spatial expansion of each matrix structure indicates that the PMLD architecture excels in terms of expandability compared to the MA1 and MA2 matrices. Consequently, third-and fifth-order PMLD matrix architectures are employed for classification techniques, demonstrating enhanced sensitivity with increased matrix order. These results are validated through the classification of several test candidates, confirming the efficacy of the proposed method. The study suggests that the developed approach holds substantial potential for clinical diagnostics in the early detection of atrial fibrillation.


Introduction
Atrial fibrillation (AF) is a prevalent cardiac arrhythmia characterized by irregular and frequently accelerated heartbeats.It increases the risk of cardiovascular mortality, severe cardiovascular events, heart failure, ischemic heart disease, sudden cardiac death, and stroke [1,2].Patients often suffer symptoms with AF such as exhaustion, palpitations, shortness of breath, and chest discomfort.In some instances, individuals also experience these with asymptomatic or silent AF, meaning that an individual may not exhibit any visible symptoms related to AF.Thus, it is crucial to mention that silent AF or undiagnosed AF can cause life-threatening thromboembolic consequences due to its intermittent nature [3,4].The combination of rhythm irregularities in the AF makes the diagnosis and detection difficult and thus requires efficient and effective methods and tools for its early detection [2,4,5].
Various heart health monitoring instruments are available on the market for the detection of AF, and one such tool is AliveCor [2].However, it is important to mention that this equipment is distinguished by a significant expense, making it unattainable for most individuals.Moreover, the achievement of reliable outcomes with AliveCor relies on the precise and prompt identification of AF symptoms.Other methods for diagnosing AF include the use of single-lead electrocardiogram (ECG) monitors, Holter monitoring, mobile telemetry monitoring, and implanted loop recorders [2].These heart health monitoring methods may be classified as either expensive or may necessitate the use of specialized methods that must be used in conjunction with substantial signal processing algorithms to provide high-quality and reliable results.
The 12-lead electrocardiogram (ECG) is often regarded as the most dependable technique for identifying a fibrillation waveform [6,7].When diagnosing atrial fibrillation (AF) using the electrocardiogram (ECG), physicians look for abnormalities in the pattern of ECG waveforms.This includes irregularities in the RR interval and the absence of P waves, which are replaced by irregular fibrillation waves (f waves) that vary in shape and size.There is a huge body of research that studies atrial fibrillation symptoms for early detection.It has been shown in one of the studies that hospitalized patients with atrial fibrillation (AF) were older and had more health issues, such as diabetes and heart disease, compared to outpatients [8].Additionally, another study showed that patients with type 2 diabetes and hyperuricemia are 9.66 times more likely to have AF, as analyzed using a generalized linear model of the Poisson family [9].AF is a growing health concern influenced by aging and cardiovascular risk factors, progressing from paroxysmal (episodes lasting <7 days) to persistent (≥7 days) or permanent forms, with yearly progression rates varying widely [10].Hohnloser et al.'s study found Apixaban promising for AF patients up to 140 kg, but careful monitoring is needed for those at extreme weights [11].Another study revealed that 3.9% of lung cancer patients in outpatient oncology clinics had recently diagnosed AF, with high rates of major bleeding and cardiovascular events significantly impacting mortality in early-stage cancer patients [12].Diastolic dysfunction, often overlooked in coronary heart disease, can lead to AF through increased atrial afterload, stretching, and pressure, causing left atrial enlargement and triggering the condition [13].Finally, coronary embolism, a rare cause of acute STEMI, can be triggered by conditions like AF [14].These studies and many others show that the detection of AF is indeed important as it may cause many diseases and can be fatal too if not treated on time.The distinctive electrocardiogram (ECG) pattern assists clinicians in distinguishing atrial fibrillation (AF) from abnormal sinus rhythm and other types of cardiac arrhythmias [2,15,16].
The electrocardiogram (ECG) signals exhibit a complex behavior because of a range of physiological and pathological factors [17][18][19].The analysis of the ECG signal is a complex task due to its intricate nature.Nevertheless, researchers are always involved in a proactive endeavor to develop intelligent, efficient, and effective methods for the purpose of clinical diagnosis [20].Machine learning techniques have been extensively employed for the early detection of cardiac diseases.The utilization of deep learning algorithms is a prevalent practice in various domains, often employed for the purpose of executing tasks such as feature extraction and dimensionality reduction to extract pertinent information for clinical diagnosis and monitoring [21,22].In [23], a real-time deep learning model has combined the CNN and RNN for AF detection in long-term ECG recordings and has also achieved high sensitivity.Additionally, methods such as reconstructed phase space analysis [24], Lyapunov exponents [25,26], correlation dimension [27][28][29], detrended fluctuation analysis (DFA) [30], recurrence plots and Poincaré plots [31], among others, have been extensively researched to analyze the ECG signal [20].
Ziaukas et al. presented a noteworthy study that showcased a proficient mathematical methodology aimed at comprehending the complex relationship between RR interval and JT wave during a bicycle ergometry exercise [18].Their research findings unveiled that the Perfect Matrices of Lagrange Differences (PMLD) is an effective matrixbased approach to examine the ECG signal and the self-organization of the cardiovascular system during the load and recovery phases of the stress test [18].Qammar et al. also employed PMLD methodology to examine the RR interval and JT wave to gain insights into the mechanisms underlying the regulation of arterial blood pressure during the stress test [17].Qammar et al., in another study, analyzed and proved that the PMLD can be employed for the early diagnosis of atrial fibrillation episodes [20].It is worth mentioning that the utilization of matrix-based techniques has demonstrated efficacy even when working with datasets of limited size [20].This paper draws inspiration from the works of Ziaukas et al. and Qammar et al., who have convincingly showcased the efficacy of a matrix-based approach for the analysis of ECG signals [17,18,20].The main aims of this study are as follows: (1) To present and analyze three different architectures of matrices for the early detection of atrial fibrillation episodes.The first two architectures are presented by and adapted from the work of Navickas et al. [32].In this paper those matrices are labelled as Matrix Architecture One (MA1) and Matrix Architecture Two (MA2), respectively.
It is important to mention that (MA1) and (MA2) are being used for the first time for the analysis of atrial fibrillation dataset.The third architecture is sourced from the work of the Qammar et al. [20], and is referred to as Perfect Matrices of Lagrange Differences (PMLDs).( 2) It is noteworthy to mention and acknowledge that the groundwork for exploring the application of the PMLD for atrial fibrillation episodes has already been laid by Qammar et al. [20].However, ref. [20] focuses on utilizing only three cardiac parameters of the recorded ECG-JT wave, QRS complex, and RR interval [20].
Building upon this foundation, the current paper aims to extend the application of the concept of PMLD matrices to employ a broader array of cardiac parameters.Thus, the multifold objectives of the study are summarized as follows: (i) To conduct a thorough analysis of the three matrix configurations to determine if the matrix norm or large discriminant yields favorable results for the analysis of ECG signals when utilizing only three cardiac parameters: JT wave, QRS complex, and RR interval.(ii) Once the most suitable matrix architecture is identified, it will be subjected to additional analysis to evaluate its expandability.The term "expandability" within the context of the matrix architecture denotes its capacity for transformation into higher orders by integrating additional cardiac parameters.(iii) The expandability analysis will aid in identifying the specific matrix architecture for further analysis.(iv) Both the matrix sensitivity and variability are then evaluated from the second to the fifth order for the identification and classification of the atrial fibrillation episodes.(v) Finally, the classification is performed, and the assessment of test applicants is then carried out, which will bring practical implications for furthering the clinical diagnosis.

Materials and Methods
The description of the experimental setup: Five cardiac intervals are captured by employing the Kaunas-Load system for fifteen participants during resting ECG: the duration of the JT wave, the duration of the QRS complex, the RR inter-beat interval, the amplitude of the P wave represented as AP, and the duration of the P wave, denoted as DP.The overall workflow diagram is shown in Figure 1.

Participants
The research cohort is divided into two groups: healthy and unhealthy individuals.The category of healthy people includes those who have not been registered as having atrial fibrillation episodes.On the other hand, individuals within the unhealthy category do have a history of atrial fibrillation events (though they are not undergoing medical treatment).In other words, the typical lengths of the measured cardiac intervals and the characteristic shape of the ECG signal do not change.The healthy cohort consists of eight individuals, whereas the unhealthy cohort consists of six.The average age of the entire cohort is 65.84 ± 1.4 years, with a height of 1.75 ± 0.12 m, and a weight 79.4 ± 0.9 kg respectively.The healthy cohort is labelled as   whereas the unhealthy cohort is labelled as   where  represents the number of individuals in the corresponding group.

Ethics Statement
This research met all applicable standards for the ethics of experimentation in accordance with the Declaration of Helsinki as reflected in the prior approval by the Regional Biomedical Research Ethics Committee of the Lithuanian University of Health Sciences (ID No. BE-2-4, 130, 17 March 2016).Participants also provided written informed consent prior to the experiment.

Description of Matrix Architecture
The basic idea of the matrix-based analysis of the ECG signal originates from the works of Ziaukas et al. and others [17,18,20,33].For example, refs.[10,11,13] focused on analyzing the algebraic relationships between the ECG parameters for better understanding the complex self-organization of the human cardiovascular system during the load and recovery phases of the stress test.Ref. [24] focused on the development of a decision support system for the early detection of atrial fibrillation episodes.The matrix architectures employed in this study are as follows: (1) Matrix Architecture One (MA1); (2) Matrix Architecture Two (MA2); and (3) Perfect Matrices of Lagrange Differences (PMLD).The following section explains each of the matrix architecture in detail.

The Architecture of PMLD Matrices
As mentioned previously, the architecture of PMLD matrices were introduced in [18].This architecture is based on six requirements: 1.Each element within the matrix is distinct.2. Zero-order differences are positioned along the main diagonal.3. First-order differences are positioned along the secondary diagonal.4. The indices  and  can assume one of three possible values as explained in [18]. 5.The ideal matrix of Lagrange differences maintains lexicographical balance, ensuring that the number of symbols  and  in the expressions of all matrix elements is equal.6.The ideal matrix of Lagrange differences maintains temporal balance, ensuring that the number of indices with subscripts minus delta and plus delta in the expressions of all matrix elements is equal.
There are only eighteen different matrices satisfying these six requirements [18].Without loss of generality, we will consider PMLD matrix #1 in this paper.Given two synchronously recorded time series (  :  = 0,1,2,3 … ) and (  :  = 0,1,2,3 … ), PMLD matrix #1 reads [18]: where the index  represents the current moment and  is used to represent the time lag (  ℕ).In Equation ( 1), the elements on the principal diagonal represent the zero-order derivatives.The elements on the secondary diagonal represent the differences between the elements of time series   and   .Those differences could be interpreted as firstorder cross derivatives.It has also been demonstrated that PMLD matrices can be extended to higher orders [20].For example, given three synchronously recorded time series (  :  = 0,1,2,3 … ), (  :  = 0,1,2,3 … ), and (  :  = 0,1,2,3 … ), the third-order (PMLD) matrix #1 reads [20]: Note that this extension to the third order matrix keeps all six requirements in force.In other words, the extended third-order matrix in Equation ( 2) is also a PMLD matrix.

The Architecture of MA1 and MA2 Matrices
Navickas et al. [32] proposed two matrix architectures for analyzing the relationships between two time series.Given two time series (  :  = 0,1,2,3 … ) and (  :  = 0,1,2,3 … ) the second-order MA1 reads: From Equation (3), it is evident that all six requirements raised for PMLD are also satisfied for MA1.However, the only difference between Equation (3) and Equation ( 1) is that the elements on the main diagonal are multiplied by a scalar factor.As detailed in reference [13], the presence of cross derivatives inherently amplifies the subtle variations in the investigated signals.One of the hypotheses which will be investigated in this paper is based on the assumption that the multiplication of the zero-order elements by a scalar factor greater than one does decrease the ability to detect those subtle variations in the investigated signals.
It is clear that the structure of MA1 also allows a straightforward expansion of the dimension of the matrix.For example, three time series (  :  = 0,1,2,3 … ) , (  :  = 0,1,2,3 … ), and (  :  = 0,1,2,3 … ) would be mapped into the MA1 architecture in the following way: Note that all six requirements are enforced for Equation (4) too.However, the expansion of the second-order MA1 to a third-order matrix can be executed in a different way (compared to Equation ( 4)).Such an expansion is represented by MA2 [32]: The major difference between MA2 (Equation ( 5)) and MA1 (Equation ( 4)) is based on the elements on the main diagonal.Unlike MA1, the lexicographical balance is not preserved in Equation ( 5).

The Significance of Matrix Expandability to Higher Orders
Expanding the dimension of the matrix to a higher order significantly enhances its ability to process the information carried by a large number of cardiac intervals.One of the hypotheses raised in this paper claims that the sensitivity and the variability of the analyzed data typically increases with the matrix size.In other words, the algorithm becomes more responsive and capable of capturing subtle changes between cardiac intervals as more information is added to it.Variability, on the other hand, is defined as the qualitative measure that reflects the extent of the data spread under distribution curves, which is crucial for the classification of individuals [20].For instance, as demonstrated in [20], the PMLD approach shows an increase in both sensitivity and variability when the matrix order is increased from the second to the third.
While the MA1 matrix can be expanded to higher orders, the multiplication of the zero-order derivative elements by a scalar greater than one could affect its ability to detect subtle variations in the analyzed signals.However, the MA2 architecture is not expandable to higher orders because it fails to meet the necessary conditions for matrix expandability.
Therefore, it is natural to focus on the expansion of the PMLD matrices for further analysis in this paper.As mentioned previously, five cardiac parameters (JT wave, QRS complex, RR cardiac interval, AP wave, and DP wave) are recorded for each participant.The main objective of this paper is to explore whether increasing the matrix size from the second to the fifth order would improve the classification of individuals for the detection of AF episodes or not.Consequently, this paper methodically expands the PMLD architecture from the second order (JT, QRS and JT, RR cardiac parameters) to the third order (JT, QRS, RR cardiac parameters), to the fourth order (JT, QRS, RR, AP cardiac parameters), and finally to the fifth order (JT, QRS, RR, AP, DP cardiac parameters), respectively.

The Degree of Freedom in the Matrix Architecture
The degree of freedom in the matrix architecture encompasses the flexibility to arrange the matrix elements in various configurations while adhering to the six requirements raised for the PMLD matrix.Those requirements ensure that the ordering of elements in the matrix maintains a consistent pattern, which is crucial for the integrity of the local matrix structure.For example, when considering a second-order matrix derived from two synchronously recorded time series (  :  = 0,1,2,3 … ) and (  :  = 0,1,2,3 … ), there are four different ways to arrange all the elements of the matrix while preserving the requirements.Each arrangement represents a unique structure of the matrix: While the MA1 and PMLD matrices allow for this degree of freedom due to their lexicographical balance, the same degree of freedom is not achievable for MA2.Also, in the research conducted by Qammar et al., the specific arrangement depicted in Equation ( 7) is employed for analytical purposes.In accordance with this precedent, this paper also adopts the same arrangement for subsequent analysis.

The Transformation of the Sequence of the Matrices into the Scalar Time Series
The algorithm used to identify the algebraic relationship between two cardiac parameters uses two basic steps [18].Firstly, two scalar time series (representing two cardiac parameters) are transformed into a sequence of matrices.Then, this sequence of matrices is transformed into a scalar time series by using the mapping ℱ: ℝ (×) ⟶ ℝ (1×) , where  is the order of the matrix, and  is the length of the two original sequences.
Various mapping functions ℱ can be employed for this purpose.For instance, the norm of the matrix is utilized to analyze the algebraic relationships between ECG parameters in [18].Similarly, the discriminant of the matrix is used to convert the sequence of matrices into the scalar time series in [17].
In this study, two different mapping functions are utilized.The large discriminant of the matrix is used as the mapping function for MA1 and MA2 matrices, whereas the norm of the matrix is used as the mapping function for the transformation of the PMLD matrix into the scalar time series as it is also adopted in [20].

The Norm of the Matrix
In [20], the norm of the matrix is used as the mapping function to transform the PMLD into a scalar time series.The same mapping function is also utilized in this paper.Detailed discussion about the norm of matrix is already provided in [18,20].

Results and Discussion
The computational analysis of the study is organized into the following segments: (1) the comparison between the matrix norm and the matrix discriminant, (2) matrix expandability analysis and the selection of the best matrix architecture, and (3) the classification of the matrix architecture for different orders.Each of these segments will be discussed in further detail below.

The Comparison between the Matrix Norm and the Matrix Discriminant
The three cardiac parameters (the  wave, the duration of  complex and  interval) represented by time series (  :  = 0,1,2,3 … ), (  :  = 0,1,2,3 … ), and (  :  = 0,1,2,3 … ), are preprocessed.A threshold range is applied to ensure that each input value remains within physiologically plausible limits.For instance, the minimum and maximum limits are chosen for each of the time series:  (min) = 100 ms;  (max) = 400 ms;  (min) = 800 ms;  (max) = 110 ms;  (min) = 600 ms; and  (max) = 1200 ms, respectively.Any values falling below the lower bounds or exceeding the upper bounds are adjusted to the respective minimum or maximum values.The adjusted values of the time series   ,   and   are then normalized to a range between 0 and 1.For instance, the time series   is normalized as   = ( − 100) (400 − 100) ⁄ .Similarly, the time series   and   are processed through the same normalization technique, respectively.The same normalization techniques are also used in [32].
Once the input parameters are preprocessed and normalized, then, without losing the generality, the preprocessed and normalized time series   ,   and   are fitted to the three matrix architectures as represented by Equation (2), Equation (4) and Equation ( 5).Moreover, it is crucial to acknowledge that the degree of freedom allows for the choice of any variant specified in Equations ( 6)- (9).Thus, for this research, the variant mentioned in Equation ( 7) is chosen due to the reasons explained in [20].To transform the third-order matrix into a scalar series via the mapping function ℱ: ℝ 3×3 ⟶ ℝ 1×3 , twofold mapping techniques are employed.The large discriminant of the matrix is used as the mapping function for MA1 and MA2 architectures.The norm is used as the mapping function for the PMLD architecture following the criteria described in [20].The internal and external smoothing techniques are applied with the smoothing radius adjusted to the values optimized in [18].Finally, a statistical metric, such as the variance of the norm or the variance of the large discriminant, is calculated for each produced time sequence from the three original time series   ,   and   .The resulting values are depicted in Tables 1 and  2. In Tables 1 and 2, the variance values for both the large discriminant and the norm of the matrix are presented for the healthy and unhealthy cohort, respectively.It is pertinent to note that while the variance of the norm provides meaningful analytical insights into the matrix architectures, the variance of the large discriminant appears to yield misleading information without a clear analytical significance appliable for classification purposes.It can be observed that the variance of the large discriminant exhibited a wide range of values, with minimum and maximum ranges varying significantly across both healthy and unhealthy cohorts.For instance, in the healthy cohort, the variance of the large discriminant ranges from 0.042 to 1618.7723, whereas in the unhealthy cohort this variance ranged from 0.0006 to 1358.7248.In contrast, the variance of the norm demonstrated more consistency and interpretable trends, with narrower minimum and maximum ranges.For example, the variance of the norm ranges from 0.0010 to 0.0216 in the healthy cohort.The variance of the norm ranges from 0.0004 to 0.0177 in the unhealthy cohort.This observation underscores the importance of employing the norm of the matrices as a useful and relevant statistical metric for further computations for the distribution and classification (seen in Figure 2).

Matrix Expandability Analysis and the Selection of the Best Matrix Architecture
Once it has been decided that the variance of the norm will be used as the metric of choice, further investigation indicates a challenge in selecting the optimum matrix architecture among PMLD, MA1 and MA2.This concern emerges from the closeness in variance values produced by all the architectures for both healthy and unhealthy candidates.For example, when examining the healthy candidate  1 , it is observed that the variances of the norm for each architecture are rather close to each other: MA1 = 0.0016, MA2 = 0.0010, and PMLD = 0.0012, respectively.This trend persists consistently across all candidates for both healthy and unhealthy participants.
Thus, a selection criterion is needed to discover the best matrix architecture.The first criterion for the selection of matrix architecture revolves around the expandability of a matrix by focusing on the six requirements [18].These requirements facilitate the integration of additional data or cardiac parameters into the matrix structure.As mentioned previously, both the MA1 and PMLD architectures can be naturally expanded due to their inherent properties.However, the MA2 architecture fails to fulfil the requirements due to the loss of balance among its elements, rendering it unsuitable for further analysis and leading to its exclusion from the selection criteria.
Moreover, upon a closer examination of the MA1 architecture, it can also be observed that the principle diagonal elements are multiplied by a scalar.As previously discussed, the multiplication of the zero-order elements by a scalar factor greater than one does decrease its ability to detect the subtle variations in the investigated signals [18].Consequently, the MA1 architecture is also excluded from the selection criteria.
Thus, based upon the selection criteria, the PMLD architecture emerges as the most reliable choice for the subsequent computations, expandability analysis, and the development of the classification techniques.Its balanced structure, coupled with its ability to accommodate new data, positions the PMLD architecture as the optimal matrix architecture for the analysis of complex signals like ECG.
Table 3 provides results for the norm of the PMLD matrix for the healthy candidates from the second to the fifth orders.A general trend is observed in both the sensitivity and the variability of the produced data.As defined already, sensitivity in the context of this paper is defined as the ability of the matrix to produce larger variance values as the size of the matrix is expanded.For instance, candidates such as  2 ,  4 ,  6 , and  8 show higher sensitivity as the order of the matrix is increased.Other candidates like  1  3 ,  5 and  7 also show an increase in variance values except for the fourth-order PMLD.For example, the individual  7 has shown an increase in variance values in the second-, third-, and fifth-order matrices, but it displays a lower variance value in the fourth-order as compared to the third-order PMLD.Also, variability is defined as the qualitative measure that reflects the extent of data spread under the Gaussian distribution curves, which is important for the classification of individuals.The variability of the data obtained for a healthy cohort for the third-order PMLD and the fifth-order PMLD is seen in Figure 3a.
Table 3.The values for the variance of the norm of the PMLD matrix (from the second to the fifth orders) for the healthy cohort.From the data tabulated in Table 4, it can be observed that the candidates  1 ,  3 ,  6 , and  8 show an increase in sensitivity as the matrix order is increased.Candidate  2 shows a very consistent sensitivity as the order of the matrix is increased.In terms of variability, while there is some degree of variation present within the unhealthy cohort, if a comparison is made between the variability of the healthy and the unhealthy cohort, a higher degree of variability will be observed in the healthy group.This observation suggests that the variability in cardiac parameters among individuals in the healthy group is more pronounced than that among individuals in the unhealthy group.Furthermore, while the fourth-order matrix does yield a greater sensitivity in a majority of the cases, it could not provide a one hundred percent increase in sensitivity in all cases as compared to other matrix orders.Therefore, it is normal to focus solely on the matrix orders that consistently demonstrated a hundred percent increase in sensitivity in all of the matrix dimensions.As a result, the third-order PMLD and the fifth-order PMLD matrices are utilized for classification purposes as outlined in the subsequent section.

The Classification of the Matrix Architecture for the Different Orders
In order to perform the classification, the techniques employed in the previous study are applied here too [20].To establish the variation interval for classification, the variance values for the third-and the fifth-order PMLD matrices are utilized from Tables 2 and 3.The variance values are fitted to the Gaussian distribution as shown in Figure 2. The variance values for the healthy candidates are denoted by blue circles along the -axis and the variance values for unhealthy individuals are represented by red circles as depicted in Figure 2. Once the distributions are in place, the normal distribution of the dataset (the variance values) is validated by performing the Anderson-Darling test.The Anderson-Darling test is chosen to validate the normal distribution of the variance values because of its sensitivity to deviations in the tails of the distribution, which is crucial for our dataset and is also utilized in [20].Also, the 95% confidence intervals for the mean and variance values of both healthy and unhealthy individuals are used.The same confidence intervals are also used in [17].Upon confirming the normal distribution, we proceed with applying the one sigma rule to the distributed dataset for the third-and the fifth-order PMLD matrices for the generation of the variation interval.To do so, the one sigma rule is applied upon the distributed dataset where the left boundary is defined as mean minus sigma (μ h 3 − σ h 3 ) and the right boundary is established as mean plus sigma (μ u 3 + σ u 3 ) for the third-order PMLD matrix as shown in Figure 2a.Similarly, the same statistical technique is adopted to apply the one sigma rule for the fifth-order PMLD matrix where the left boundary is defined as mean minus sigma (μ h 5 − σ h 5 ) and the right boundary is defined as (μ u 5 + σ u 5 ).The variation interval is built for classification purposes and is visualized by the double-headed arrow as depicted in Figure 2b.This technique assures both clarity and precision in establishing classification boundaries, allowing for accurate categorization for individuals based on the variance values.To enhance the classification accuracy of test candidates, a machine-trained model was developed.This involved creating a self-trained model to validate the algorithm and to establish a decision support system for classification purposes.It is crucial for this system to adhere to the rules outlined in Table 5 for both healthy and unhealthy candidates.In Table 5, the variable  represents the variance value for the test candidate.This variable is tested against the three conditions presented and will classify the individual accordingly for both the third-and the fifth-order PMLD matrices.An indicator variable  is also introduced, which will determine where the test individual falls inside the classification interval according to the conditions explained as follows.
Table 5. Classification criteria for the development of the decision support system.The variable Z stands for the variance of the new candidate, and IND stands for the probability indicator.The h indices denote a healthy individual, whereas u denotes an unhealthy individual.

For the 3rd-Order PMLD Condition 1 Condition 2 Condition 3
Then, the probability indicator is: 3 ) The candidate is classified as Healthy Unhealthy In between the healthy and unhealthy group based upon the variance values For the 5th-Order PMLD Then, the probability indicator is: The candidate is classified as Healthy Unhealthy In between the healthy and unhealthy group based upon the variance values Condition 1 (  = 0): If  is less than or equal to the lower boundary of the variance values for healthy individuals (μ h 3 − σ h 3 ), the probability indicator is set to zero.This condition signifies a low probability of the candidate belonging to the unhealthy group.
Condition 2 ( = 1): If  is greater than or equal to the upper boundary of the variance values for unhealthy individuals (μ u 3 + σ u 3 ), the probability indicator is set to one.This condition suggests a high probability of the candidate belonging to the unhealthy group.
Condition 3 (0 ≤  ≤ 1): If Z falls within the range between the upper boundary of the variance values for unhealthy individuals and the lower boundary of the variance values for healthy individuals, the probability indicator is calculated using a linear interpolation formula as follows: The condition presented in Equation ( 11) reflects a probability between 0 and 1, indicating the candidate's likelihood of belonging to either the healthy or the unhealthy group based on the degree to which their variance value deviates from the established boundaries.

Testing Candidates
The cardiac parameters are captured from the resting ECG for the three test candidates.The recorded cardiac parameters are the duration of the JT wave, the duration of the QRS complex, the RR inter-beat interval, the AP wave, and the DP wave, respectively.Those cardiac parameters are transformed into the time series (  :  = 0,1,2,3 … ) , (  :  = 0,1,2,3 … ) , (  :  = 0,1,2,3 … ) , (  :  = 0,1,2,3 … ) , and (  :  = 0,1,2,3 … ), respectively.It is important to note that there is pre-knowledge about the three candidates regarding their health status (having or not having had atrial fibrillation occurrences before).The first two candidates have no recorded history of atrial fibrillation whereas the third test candidate has a recorded history of atrial fibrillation occurrences.With this prior knowledge, the aim is to test the accuracy of the proposed matrix architectures (the third-and the fifth-order PMLD) as well as the proposed classification techniques.
First, the preprocessing techniques are applied to the time series as mentioned already in the methods section.The preprocessed parameters are then fitted into the thirdand the fifth-order PMLD matrix architectures, and the variance of the norm is produced for the three test candidates.
For the first candidate, it is observed that the individual's variance values have placed the person within the variation interval, positioning them towards the left end of the distribution for the third-order PMLD as seen in Figure 3a.This can also be observed as a visual representation by the inclusion of an asterisk symbol, indicating the individual's placement within the classification interval in Figure 3a.The interpolation techniques are performed using the developed decision support system using the criteria listed in Table 5.The decision support system shows that the individual satisfies condition 1, which is an indication of a healthy state (cardiovascular health-wise).Furthermore, the probability distribution chart illustrates a probability of less than 0.1 for the individual to be unhealthy, signifying their placement within the healthy region as seen in Figure 3b.Finally, a semi-gauge indicator tool is used to visualize an individual's health status using three indicated regions (green, yellow, and red).When the needle of the gauge points to green, it indicates that the person is in the health-wise (cardiovascular healthwise) safety zone.If the needle of the gauge is in the center yellow zone, it indicates that the individual is recommended to pursue clinical attention for follow ups on his cardiovascular health.Finally, if the needle of the gauge is in the red zone, it indicates that the person is unhealthy (cardiovascular health-wise) and requires serious attention from specialists.The semi gauge indication tool in Figure 3c produces a reading in the green zone, meaning that the test candidate is, health-wise, in the safe zone.
The same computational techniques are employed for the classification of the same individual using the fifth-order PMLD matrix architecture.It can be observed that the variance value produced for this individual places him into the healthy candidates category as seen in Figure 3d.The decision support system performs the interpolation based upon the rules established in Table 5 and shows a zero probability for the individual to be classified as unhealthy as seen in Figure 3e.Finaly, the semi-gauge indication tool also categorizes the individual under the green region as seen in Figure 3f.
Both the third and fifth order PMLD matrix configurations identify the individual as a healthy candidate.It is important to emphasize that the individual is known to be healthy, as there have been no previously recorded symptoms of atrial fibrillation episodes.The purpose of this analysis is to add the individuals' cardiac parameters into the entire algorithm and classification technique and to determine if the system is capable of classifying the person as healthy for both the third and fifth order PMLD matrix architectures.
Figure 4 shows the ECG parameters of another test candidate.The decision support system for third-order PMLD matrices implies that the person is healthy, as shown in Figure 4a.The probability of the individual being unhealthy is close to zero, as observed in Figure 3b.Furthermore, the semi-gauge indicator tool depicts the individual's health state under the green color (Figure 4c).Again, the same computational routine is performed for the ECG parameters for the fifth-order PMLD matrix.It can be noted that the classification criteria classify the individual under the category of healthy persons (Figure 4d).The decision support system shows a zero probability for the individual being unhealthy as seen in Figure 4e.Similarly, the semi-gauge indication tool also depicts the health status of the person under the green zone (Figure 4f).The increased sensitivity attained with the fifth-order PMLD is obvious when the needle is positioned inside the green zone.Whether using the third or fifth order matrices, the decision support system continually provides engaging conclusions, situating the person within the green zone, which indicates a positive health state.The ECG parameters of the third test candidate undergo evaluation within the classification criteria of both the third-and fifth-order PMLD matrices.As depicted in Figure 5a-c, the individual falls within the classification interval of unhealthy candidates for the third-order PMLD matrix.The developed decision support system shows a large probability for the individual being unhealthy.This classification also aligns with the indication provided by the semi-gauge indication tool, which points towards the red zone.Moreover, the individual's ECG parameters are also tested and subjected to evaluation under the fifth-order PMLD matrix.Again, the developed decision support system classifies the individual as an unhealthy candidate, as evidenced by the semigauge indication tool (Figure 5d-f).
The utilization of the PMLD matrix architecture emerges as a robust and flexible mathematical tool for effectively analyzing the relationships between the parameters of the ECG signal.Previous studies [12][13][14] have already underscored the efficacy of PMLD as a mathematical technique for analyzing ECG signals and their parameters.
Various computational aspects are taken into account in order to analyze the ECG parameters for the detection of atrial fibrillation episodes for a specific group of individuals in this paper.This study elucidates various factors contributing to the functionality of PMLD matrices.For example, the arrangement of ECG parameters within the matrix structure, the degree of freedom available for the balancing of its elements, and the order of the matrix play crucial roles in the proposed classification technique.
In general, increasing the matrix order has been shown to enhance the PMLD's sensitivity.However, an important observation is made about the sensitivity of the fourthorder PMLD.In few of the cases, it is observed that the sensitivity of the fourth-order matrix was slightly lower than that of the third order.It other words, the second, third and fifth order of the PMLD have shown a reliable increase in the sensitivity whereas the same increase cannot be achieved by the fourth-order PMLD matrix.Again, as previously mentioned, there are several aspects that influence the intended results.For instance, many contemporary methods for the detection of atrial fibrillation are focused on finding the impact of certain diseases or medication on atrial fibrillation.On the other hand, major techniques used for the detection of atrial fibrillation are based on the analysis of relatively long ECG records (sometimes persons are required to wear ECG monitors for more than 24 h).Our approach is completely different.Firstly, we are designing an algorithm capable of detecting atrial fibrillation episodes from short ECG records (no longer than 07 min).Secondly, the participants in the unhealthy group do not take any medications, so the impact of diseases and medications completely falls out of the scope of this paper.Therefore, a straightforward comparison with other techniques and methods is simply not possible.
Nonetheless, the PMLD's overall effectiveness, sensitivity, and variability in ECG signal analysis are clear and unquestionable.It is important to mention that the proposed method is computationally efficient, making it suitable for real-time applications.The time complexity of the PMLD matrix approach is manageable, even with higher-order matrices as shown already.
Furthermore, the PMLD matrix approach demonstrates its efficacy even with limited datasets.While this serves as a strong point to its robustness, it also poses a limitation to the study.Specifically, the self-training nature of the decision support system implies that its efficiency and accuracy are contingent upon the size of the data fed into it.Hence, the study highlights the critical interplay between dataset size and the system's predictive capabilities.
In essence, the study underscores the multifaceted nature of PMLD in ECG signal analysis, emphasizing its significance over the MA1 and MA2 matrix architectures.

Conclusions
Three matrix architectures have been presented for the analysis of ECG parameters, for various orders, for the detection of atrial fibrillation episodes.A group of 15 individuals was tested with the three matrix architectures.It has been found that the matrix norm has produced convincingly better results as compared to the large discriminant of the matrix.Moreover, the spatial expansion of each of the matrix structures was analyzed in detail, and it has been shown that the PMLD is a better fit for the expandability of analysis as compared to the MA1 and MA2 matrices.Therefore, the third-and fifth-order PMLD architectures were used for classification techniques, and it is shown that the sensitivity of the matrix structure is increased as the order of the matrix is increased.These outcomes are affirmed after testing a few candidates under the developed classification criterion.Without doubts, the proposed study could be useful for the clinical diagnostics of atrial fibrillation.

Figure 1 .
Figure 1.The workflow diagram for the proposed algorithm.

Figure 2 .
Figure 2. The distribution graphs for the healthy and unhealthy cohort for the third and fifth order PMLD.

Figure 3 .
Figure 3. First test candidate under the classification criteria for the third and fifth order PMLD matrices.

Figure 4 .
Figure 4. Second test candidate under the classification criteria for the third and fifth order PMLD matrices.

Figure 5 .
Figure 5. Third test candidate under the classification criteria for the third and fifth order PMLD matrices.

Table 1 .
The comparison of the variance values for different matrix architectures for healthy candidates.

Table 2 .
The comparison of the variance values for different matrix architectures for unhealthy candidates.

Table 4 .
The values for the variance of the norm of the PMLD matrix (from the second to the fifth orders) for the unhealthy cohort.