ISSN 2303-4521 Periodicals of Engineering and Natural Sciences Original Research Vol. 12, No. 3, December 2024, pp.604-615 © The Author 2024. This work is licensed under a Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0/) that allows others to share and adapt the material for any purpose (even commercially), in any medium with an acknowledgement of the work's authorship and initial publication in this journal. 604 Extubating of a patient undergoing mechanical ventilation: What is the right time? A retrospective study assisted by artificial intelligence techniques C. J. Arismendi Pererira2, C. L. Sandoval-Rodríguez 1-3,, B. F. Giraldo4, E. H. Solano2 1Unidades Tecnológicas de Santander, Calle de los estudiantes · 9-82, 680005, Bucaramanga, Colombia 2 Universidad Autonoma de Bucaramanga, Av. 42 #48 – 11, 680002, Bucaramanga, Colombia 3 University of the Basque Country UPV/EHU, Plaza Torres Quevedo 1, 48013 Bilbao, Spain 4Institute for Bioengineering of Catalonia (IBEC), The Barcelona Institute of Science and Technology, and CIBER de Bioingeniería, Biomateriales y Nanomedicina, Barcelona, Spainechnical University of Catalonia, ABSTRACT In the presence of acute respiratory failure, mechanical ventilation emerges as a temporary alternative to maintain adequate gas exchange in the body such as that which occurs in natural respiration. This technique is widely used in intensive care units. Our objective was to carry out an analysis and interpretation of cardiorespiratory signals in patients assisted by mechanical ventilation, using non-linear analysis techniques of dynamic systems, data mining and machine learning techniques to establish indices that allow determining the appropriate moment of disconnection. in patients during the weaning process. We use three categories: Failure, success and reintubated. We introduced a new variant of Moving Window with Variance Analysis, with which good results are obtained. We have found that by using all the time series available in the database, we have obtained an accuracy of 96% when using simple symbolic dynamics to differentiate between successful weaning and reintubated cases. and 86% when comparing success and failure, which contrasts with the results observed in the state of the art. Keywords: T-tube testing for extubating. Symbolic dynamics, Artificial neural networks, Linear discriminant analysis. Moving Window with Variance Analysis. Forward selection, Support Vector Machines. Corresponding Author: Camilo Leonardo Sandoval Rodriguez Electromechanical Engineering Program Unidades Tecnológicas de Santander Av. Los Estudiantes #9-82, Bucaramanga, 680005, Colombia E-mail: csandoval@correo.uts.edu.co 1. Introduction A cardiorespiratory arrest requires protocol attention according to cardiopulmonary resuscitation standards[1], [2]. The guidelines recommend the measurement of different cardiorespiratory signals[3]. These time series are used to estimate the characteristics of the chest and quality during a resuscitation maneuver [4], [5], as well as to estimate the patient's prognosis by analyzing the incidence of the maneuver in the measured time series[6], [7]. The resuscitation maneuver consists of the application of chest compressions and the application of ventilation and MV[8]. On the other hand, MV consists of an artificial respiration process that helps replace the ventilatory function of a patient, improving oxygenation and reducing the effort of the respiratory muscles, until the functions of the patient's pulmonary system are adequately restored[9]. In this way, the ventilator disconnection maneuver is carried out through the Spontaneous Ventilation Test (SVT) and must be carried out at the appropriate time [10]. This is because both the perpetuation and early withdrawal of assisted breathing can cause an increase in the possibility of contracting nosocomial (or hospital-acquired) infections, atrophy of the respiratory muscles, retention of secretions, loss of defense mechanisms, among others disorders[11]–[13]. PEN Vol. 12, No. 3, December 2024, pp.604-615 605 Therefore, estimating the optimal moment for extubating of patients undergoing MV is extremely important [14], [15]. Previous work proposed a method for studying differences in the variability of the respiratory pattern in patients undergoing weaning trials. Heart failure and the prediction of clinical events, such as weaning from mechanical ventilation, are challenges in the management of patients with cardiac and respiratory pathologies. In [16], 27 CHF patients were evaluated using machine learning techniques applied to respiratory flow signals . The authors achieved a classification accuracy of 89.3% by using continuous wavelet transform (CWT) in differentiating respiratory patterns between CHF patients and their controls. The algorithms employed were the support vector model (SVM) and k-nearest neighbors (k-NN). The accuracy of SVM was 92%, which was higher than the k-NN performance. This result highlights the ability of machine learning-based methods to detect subtle features in non-stationary respiratory signals, providing an avenue for early diagnosis of CHF. In [17], they used joint symbolic analysis (JSD) to study cardiorespiratory interactions in 42 patients with dilated and ischemic cardiomyopathies. Using principal component analysis (PCA) and SVM classification, they achieved an accuracy of 85.7% in identifying patients at higher risk of sudden death, demonstrating that nonlinear interactions between the cardiac and respiratory systems can be valuable indicators of the prognosis of these patients. The proposed methodology was based on a Support Vector Machine. A feature selection procedure was applied based on the use of SVM with leave-one-out cross validation. 86.67% of patients were well classified for one class. In addition, in the past two decades, with the advancement of technology, computer performance has become increasingly better. People’s understanding of pattern recognition by symbolic and math algorithms is also becoming increasingly mature, and many of our dream functions can be applied in real life, which generates important tools to identify the exact moment of extubating [11], [15], [18]– [21]. For example [21] reviewed 26 studies on machine learning in mechanical ventilation management. They observed that ensemble models (boosting) achieved a 94% accuracy in predicting tidal volumes and weaning success, surpassing neural networks and other conventional machine learning algorithms. Therefore, combine of multiple algorithms can improve the robustness of predictions, reducing the inherent variability in clinical data. We have used algorithms from Symbolic dynamics (SD), Artificial neural networks (ANN), Linear discriminant analysis (LDA). Forward selection (FS), Support Vector Machines (SVM) combined. We have introduced a new Moving Window with Variance Analysis (MWVA) with three class, resulting on characteristics with a high percentage of correct answers. 2. Materials and methods 2.1 Data collection Our study uses the WeanDB database, taken from a study involving the electrocardiographic and respiratory flow signals of 133 patients who underwent mechanical ventilation and extubation. These patients were enrolled in the Intensive Care Services at the Hospital de la Santa Creu i Sant Pau in Barcelona and the Hospital de Getafe with approved ethical protocols. Patients participated in a T-tube test for 30 minutes (1800 seconds) as part of the extubation protocol of spontaneous breathing. So, we have used a retrospective database of episodes associated with the weaning trial. Seven respiratory series, Respiratory frequency – circulating volume relationship (FV), expiration time (TE), inspiration time (TI), respiratory cycle length (TO), fraction respiratory cycle (TT), mean respiratory flow (VI), circulating volume time series (VT) and the RR interval (RR) respiratory series, each individually. Respiratory flow signals from 27 elderly patients admitted to the short-stay unit of the Hospital de la Santa Creu i Sant Pau in Barcelona, Spain, were recorded. The local ethics committee had previously approved a protocol to conduct the study. The pneumotachograph, consisting of a Datex-Ohmeda monitor and a Validyne variable reluctance transducer model MP45-1-871, was used to obtain the respiratory flow signal. The signals were recorded at a sampling frequency of 250 Hz and a resolution of 12 bits. 2.2 Data processing First, conversion of cardiorespiratory series into symbolic sequences and obtaining classification parameters through the use of SD techniques[22]. At the end of this stage, each of the cardiorespiratory series must have been converted into words and additional indices must be extracted that allow classification between classes. PEN Vol. 12, No. 3, December 2024, pp.604-615 606 2.3 Automatic feature selection The data processing computing SD will obtain 568 variables, in order to optimize the dimensionality of the final model avoiding the dimensionality curse, a feature selection stage, based on the FS technique is implemented to determine the most relevant variables for classification with neural networks. Feature selection was used for 5 different sceneries according to table 1 Table 1. Labeling of the scenarios Scenery Groups Class TAG 1 Success vs Failure Class 0 vs Class 1 2 Success vs. Reintubated Class 0 vs Class 2 3 Failure vs Reintubated Class 1 vs Class 2 4 Success vs. (Reintubated or Failure) Class 0 vs (Class 2 U Class 1) 5 Success vs. Reintubated vs. Failure. Class 0 vs Class 2 Vs Class 1 ccording to the clinical staff, is necessary to analyze the union (U) between Class 2, and Class 1 in a meta- class therefore the Mann-Whitney U test was implemented to the variables computed with the SD technique, in order to establish significative differences between classes based on standard measures of symbolic dynamics. The seven respiratory series (FV, TE, TI, TO, TT, VI, VT) and the RR series are used individually. For classification problems in all scenarios (see Table 3), we use pattern net artificial neural networks with a resilient back-propagation training algorithm, which takes only the error gradient sign, and not its magnitude, when the time to update weights of the neural network. We determine the number of characteristics (number of variables) with which the classifier performance is maximum by measuring its average accuracy and standard deviation. Thus, if the deviation is low, the average accuracy represents the performance. 2.4 Classification and variables selection using combination of techniques In 5th scenery a simple SD technique to extract the feature of the signals and an: extension of the MWVA dimensionality reduction technique (i.e., three classes problem) was used with the classifiers. For scenarios 1, 2, and 4 joint SD were used incorporating the RR series to evaluate the cardiorespiratory interaction between the respiratory and cardiac series. 2.4.1. Three class problem Moving Windows with Variance Analysis Techniques In this study, two extensions of the MWVA feature selection technique[23] has been proposed in order to apply it to classification problems with three classes: MWVA- Between Group Variance (MWVA-BGV) and MWVA- Between Group Area (MWVA-BGA). • Moving Windows with Variance Analysis, - Between Group Variance Equations (2, 3, 4) present an extension of the definition of the quotient Ω in[23] 𝑊𝐺𝑉(𝜔, 𝑖) = ∑ ‖𝑋1(𝑎,𝜔,𝑖)−𝑋1̅̅ ̅̅ (𝜔,𝑖)‖ 2 𝑛1.√𝜔 𝑛1 𝑎=1 + ∑ ‖𝑋2(𝑎,𝜔,𝑖)−𝑋2̅̅ ̅̅ (𝜔,𝑖)‖ 2 𝑛2.√𝜔 𝑛2 𝑎=1 + ∑ ‖𝑋3(𝑎,𝜔,𝑖)−𝑋3̅̅ ̅̅ (𝜔,𝑖)‖ 2 𝑛3.√𝜔 𝑛3 𝑎=1 𝑊𝐺𝑉(𝜔, 𝑖) = (𝑑12) 2 + (𝑑13) 2 + (𝑑23) 2 (2) 𝐵𝐺𝑉(𝜔, 𝑖) = ‖𝑋1̅̅̅̅ (𝜔,𝑖)−𝑋2̅̅̅̅ (𝜔,𝑖)‖ 2 3.√𝜔 + ‖𝑋1̅̅̅̅ (𝜔,𝑖)−𝑋3̅̅̅̅ (𝜔,𝑖)‖ 2 3.√𝜔 + ‖𝑋2̅̅̅̅ (𝜔,𝑖)−𝑋3̅̅̅̅ (𝜔,𝑖)‖ 2 3.√𝜔 𝐵𝐺𝑉(𝜔, 𝑖) = (𝑑1) 2 + (𝑑2) 2 + (𝑑3) 2 (3) PEN Vol. 12, No. 3, December 2024, pp.604-615 607 Ω𝐵𝐺𝑉(𝜔, 𝑖) = 𝐵𝐺𝑉(𝜔,𝑖) 𝑊𝐺𝑉(𝜔,𝑖) (4) These equations can be interpreted geometrically as the quotient between the sum of the distances between the centroids of the different classes (BGV) the Within Group Variance (WGV) was computed as the sum of the averages of the squares of the distances of all the members of a class to the centroid of the class Ω BGV, is defined as the quotient between WGV and BGV (Figure 1), n1, n2 y n3 represents the cardinality of each class, w the width of the window and I represents the window start sample[23] Figure 1. Graphical representation of MWVA- BGV • Moving Windows with Variance Analysis- Between Group Area The MWVA-BGA calculates for the three classes the quotient of the Area of the Triangle Centroids (ATC) and the WGV (Figure 2), where ATC corresponds to the (BGA value). The BGA is favored when the distance between centroids of the classes is the same, penalizing the descriptor when two groups are very close and the other is far away. Equations 5 and 6 calculates BGA and Ω_BGA descriptors respectively. 𝐵𝐺𝐴(𝜔, 𝑖) = ‖𝑋1̅̅̅̅ −𝑋2̅̅̅̅ ‖.‖(𝑋3̅̅̅̅ −𝑋2̅̅̅̅ )−𝑃𝑟𝑜𝑦(𝑋1̅̅ ̅̅ −𝑋2̅̅ ̅̅ ) (𝑋3̅̅̅̅ −𝑋2̅̅̅̅ )‖ 2 (5) Ω𝐵𝐺𝐴(𝜔, 𝑖) = 𝐵𝐺𝐴(𝜔,𝑖) 𝑊𝐺𝑉(𝜔,𝑖) (6) Figure 2. MWVA for 3 classes, BGA variant 2.4.2. Symbolic Dynamics and three-class problem The 7 respiratory series (FV, TE, TI, TO, TT, VI, VT) and the cardiac series RR were computed with de simple SD [22] technique to the classes of the scenery 5, obtaining a total variables of 568. For this, SVM was used since it has been shown that appropriate results are obtained. [17], [24], [25]. To fit the SVMs, a radial basis PEN Vol. 12, No. 3, December 2024, pp.604-615 608 function kernel has been selected; The factor that determines the compromise between the margin of the classification hyper-plane and the classification precision has been selected using Matlab's ® own algorithms. Given that, by their very nature, SVMs are binary classifiers, it has been necessary to decompose the problem into three, specifically: - P1: Class 0 vs. Class 1 (Scenery 1) - P2: Class 0 vs. Class 2 (Scenery 2) - P3: Class 1 vs. Class 2 (Scenery 3) From the results of these three problems, it is possible to decide which class a patient belongs to; To do this, it is only necessary to choose the class that has been selected twice among problems (see table 2) P1, P2 and P3. That is, if after using SVM, in P1, the patient classification was as Class 0, and after evaluating P2, was classified again as Class O, the result will be that the patient belongs to Class O. (see Table 2 for more examples) Table 2. Classification criteria Classification Problem Result P1 P2 P3 Class 0 Class 0 Class 2 Class 0 Class 0 Class 0 Class 1 Class 0 Class 0 Class 2 Class 2 Class 2 Class 0 Class 2 Class 1 indeterminate Class 1 Class 0 Class 2 indeterminate Class 1 Class 0 Class 1 Class 1 Class 1 Class 2 Class 2 Class 2 Class 1 Class 2 Class 1 Class 1 For classification, several possible strategies were used: use of all variables, use of MWVA extended to 3 classes, based on the sum of intergroup variances. BGV, use of MWVA extended to 3 classes, based on the intergroup area. BGA, Combination of MWVA-BGV and Forward Selection, and. Combination of MWVA- BGA and Forward Selection. 2.4.3. Joint Symbolic Dynamics applied to binary classification problems Joint Symbolic Dynamics (JSD) is a technique that allows considering the interaction between two time series when performing classification. This information could be of utmost importance in solving a classification problem; However, most data processing techniques do not allow such information to be considered. JSD techniques were applied, combining certain respiratory series to the RR cardiac series, in order to determine if this additional information allows for better performance in one or more of the binary classification problems that have been treated in the first part of this work. The combinations of respiratory series with RR were as follows: FV & RR: f/VT ratio and RR interval, TE & RR: Expiration time and RR interval, TI & RR: Inspiration time and RR interval, TT & RR: Total respiratory cycle duration and RR interval. Studied problems was: scenarios 1, 2, and 4 (see table 1). For each of the cases, the use of all variables, use of forward Selection, use of MWVA and a combination between MWVA and Forward Selection was implemented. The classification tools used were ANN and LDA. 3. Results The results are divided into 4 parts. First the statistical analysis of the Mann-Whitney U test. Then results associated with the application of simple symbolic dynamics (SSD) for problems with scenarios 1 to 4. Then, Simple Symbolic Dynamics: three-class problem (Success vs. Reintubated vs. Failure). Finally, the application of JSD for problems in scenario 5. 3.1. Mann-Whitney U test In order to show the most significant variables for the classification, the Mann-Whitney U test was performed. Table three shows the results. PEN Vol. 12, No. 3, December 2024, pp.604-615 609 Table 3. Number of Variables with a Significant Difference according to the Mann-Whitney U test Scenery Number of Variables with Significant Difference FV RR TE TI TO TT VI VT Total 1 5 1 16 11 21 4 12 12 82 2 3 2 3 1 11 2 2 2 26 3 2 4 8 0 4 7 2 4 31 4 6 1 19 7 12 9 8 14 76 In the “Failure” versus “Success” test (scenery 1), the most representative series are TE (Expiration Time) and TO (fraction between inspiration time and total time), with 16 and 21 variables with a significant difference, respectively. In the “Success” test against “Reintubated” (scenery 2) the most representative series are TE (Expiratory time) and TT (Total time), with 8 and 7 variables with a significant difference, respectively. • In the “'Success” vs “Failure” or “Reintubated” (scenery 4) the most representative series are TE (Expiratory time), TO (fraction between inspiration time and total time) and VT (Circulating volume). with 19, 12 and 14 variables with a significant difference, respectively. When adding up the number of variables with significant differences when applying each test to all the series, we see that the classes more difficult to separate are “Failure” and “Reintubated” with 26 variables showing the affinity between both classes. In addition, when we use the number of variables with significant differences and each test to all the series, you can see that the “Success” and “Reintubated” classes have 31 variables. It reveals a certain degree of affinity between classes, which could make this the most classification problem. This result is consistent with the reality, given that the patients in the “Reintubated” class were at one time considered able to breathe. The test that, when adding up the number of variables with significant differences in all the series, presented the highest value was the “Failure” versus “Success” test; this would indicate that this is the classification problem more-easy to address. 3.2. Simple symbolic dynamics (SSD) for problems with scenery 1 to 4 (for two Class) In this section the classifier used was neural networks; the feature selection technique used was Forward Selection, which is robust in the presence of a large number of variables and a small number of examples. Figure 3. Examples of performance using forward selection algorithm and SSD, and ANN (Scneray 1and . FV,and TE series. The bottom panel shows TI and TO series) PEN Vol. 12, No. 3, December 2024, pp.604-615 610 This part explored the use of Simple Symbolic Dynamics (SSD) to decide if a patient is ready to be weaned from respiratory support. Results for scenery one and two are shown in table 4. For scenery 3 and 4 you can see table 5. Regarding the results of the classifiers, the good results obtained in certain tests, with certain series, are striking; one could think, for example, that the TO and VT series provide important information regarding the classification problem of scenery 3. Because the balancing was carried out by duplicating certain examples, and not excluding them, it is likely that the classification percentages obtained are optimistic, with respect to an implementation in a real situation. Figure 1, shows examples for scenery 1 and some time series. The top panel shows scenary 1 to FV,and TE series. The bottom panel shows TI and TO series. Table 4. Results SSD for 1-2. Scenario (Using ANN) Serie Scenery 1 Scenery 2 Accuracy + standar deviation Number of variables Accuracy + standar deviation Number of variables FV 73,32±7,23% 13 85,79±9,3% 6 RR 71,05±7,99% 18 84,26±6,8% 37 TE 74,32±8,48% 19 88,68±6,88% 17 TI 74,63±8,08% 25 87,79±6,15% 43 TO 75,26±9,08% 43 93,21±5,35% 16 TT 76,32±9,25% 15 86,16±7,66% 14 VI 75,21±7,94% 26 89,68±5,6% 33 VT 77,79±6,96% 10 93,32±5,02% 14 All 86,71±5,51% 64 96,0±3,14% 18 Table 5. Results SSD for 3-4. Scenario (Using ANN) Serie Scenary 3 Scenary 4 Accuracy + standar deviation Number of variables Accuracy + standar deviation Number of variables FV 67,58±8,95% 20 66,11±13,69% 56 RR 64,84±8,04% 14 58,39±13,92% 29 TE 69,42±9,27% 3 67,43±8,88% 25 TI 68,63±7,9% 43 70±10,19% 41 TO 67,95±9,0% 7 70,79±8,93% 47 TT 67,05±7,8% 9 63,18±8,23% 14 VI 70,68±8,67% 21 67,29±11,78% 58 VT 70,26±7,73% 22 73,18±9,11% 34 All 79,11±6,99% 20 85,96±6,26% 64 3.3. Simple Symbolic Dynamics - for problems in scenery 5 For this, different characteristics were used. First, classification was carried out using all the variables, then using MWVA extended to 3 classes, BGV variant, finally, using MWVA extended to 3 classes, BGA variant. PEN Vol. 12, No. 3, December 2024, pp.604-615 611 Classification was also carried out using both MWVA BGV and Forward Selection, as well as MWVA BGA. We used SVM classifier for this problem. 3.3.1 Results using all variables First, we used all the classification variables (568). Using all the variables of all the respiratory and cardiac series (FV, TE, TI, TO, TT, VI, VT, and RR), for a total of 568 variables, we calculated an average classification percentage of 29.22% because, having a considerable number of dimensions, a large part of these variables provides redundant information and another part does not present information relevant to the problem; in addition, certain variables may probably present noise. 3.3.2 Classification using MWVA extended to 3 classes, BGV variant In order to select the variables to be used for the classification problem, the energy criterion has been used[23]. We used two values for this criterion, specifically accumulate energy (90% and 99%); in the first case, we selected 198 variables, and in the second, 378. Figure 4 shows the total normalized energy as a function of the number of variables for the two cases. After that, a cross-validation was carried out under the same conditions as for the case with all variables. In the case with the 90% energy criterion, we obtained a classification percentage of 60.39%, while in the case with the 99% energy criterion, the percentage obtained is 61.04%. In this case, a considerable improvement in the classifier's performance can be seen, compared to the case before the show (where we used all variables); this shows the effectiveness of the MWVA, in its 3-class version, BGV variant, for the selection of the variables with the high relevance to the classification problem. Figure 4. Variables retained according to the criteria of total accumulated energy 3.3.3 Classification using MWVA extended to 3 classes, BGA variant Using MWVA BGA two values were tested for the percentage of the energy criterion, specifically 90% and 99%; In the first case, 166 variables were selected and in the second, 333. A cross validation was carried out under the same conditions as for the previous cases. In the case with 90% energy criterion, a classification percentage of 59.09% is obtained, while in the case with 99% energy criterion, the percentage obtained is 60.39%. On the other hand, using forward selection + MWVA-BGV, and forward selection+ MWVA-BGA, the best performance is obtained using a total of 54 variables; The classification percentage obtained on average is 72.86%. On the other hand, using forward selection -MEVA-BGA, the best performance is obtained using a total of 22 variables; The classification percentage obtained on average is 74.48%. 3.4 JSD for problems in 5th scenery For the joint symbolic dynamics analysis, LDA and ANN algorithms were used as classifiers, and the forward selection algorithm was used for feature selection. Figure 4 shows an example of the performance of the PEN Vol. 12, No. 3, December 2024, pp.604-615 612 classification system using froward selection and LDA. Table 6 shows the summary of results for JSD in scenario 5, using ANN and LDA as classifiers. Figure 4. Examples of performance using forward selection algorithm and JSD (Scenery 5 and. FV series). Table 6. Results JSD for 5th. Scenery test LDA ANN Accuracy + standar deviation Number off variables Accuracy + standar deviation Number off variables All variables 59,14±6,67%. 344 59,25±10,67% 344 Forward Selection 87,39±5,34%. 111 76,42±7,27%. 8 MWVA 58,60±7,04% 73 59,36±11,07%. 73 MWVA + Forward Selection 74,37±3,61%, 13 69,95±6,43%. 6 4 Discussion Some systems have predominantly non-linear behavior. In these cases, detailed descriptions and classification of dynamic changes using time and frequency measurements are sometimes insufficient. Therefore, new non- linear dynamics methods derived from symbolic dynamics have been introduced [26], [27]. Our work explores two feature selection techniques: Forward Selection and Moving Window with Variance Analysis (MWVA). Forward Selection is part of the Stepwise Selection techniques, which provide very accurate results due to their high convergence capacity. However, they have a high computational cost, which makes it difficult to widely use them in applications that require high response speeds [28]–[30]. Also, Moving Window with Variance Analysis (MWVA) is a technique that allows feature selection in two-class problems[16], [30]. We have proposed an extension to this technique for three class problems: MWVA-BGV (Between-Group Variance) and MWVA-BGA (Between-Group Area). So, using forward selection - MWVA-BGV and forward selection- MWVA-BGA, the best performance is obtained using 54 variables; the classification percentage obtained on average is 72.86%. On the other hand, using forward selection -MEVA-BGA, the best performance is obtained using a total of 22 variables; the classification percentage obtained on average is 74.48%, which is a good result. On the other hand, regarding statistical analysis, when adding up the number of variables with significant differences and when applying each test to all the series, it is observed that the classes with the more difficulty to separate are “Failure” and “Reintubated” with a total of 26 variables showing a great affinity between both classes. Another important observation, is when adding up the number of variables with significant differences PEN Vol. 12, No. 3, December 2024, pp.604-615 613 and applying each test to all the series, in this example, the “Success” and “Reintubated” classes use 31 variables, revealing a certain degree of affinity between the classes, which could increase the difficulty of the classification problem. This result is close to what occurs in reality, given that the patients in the “Reintubated” class were once considered able to breathe (successfull). Also, when adding up the number of variables with significant differences in all the series, the highest value was the “Failure” versus “Success” test; therefore, this would indicate that this is the easiest classification problem to address. If this number is compared with that yielded by the test where the classes are combined, a slight distortion is observed in the information; however, the affinity between both classes is evident. means that the possibility of combining them must be considered. Finally, using all series and SSD + forward selection and ANN, a performance of 86.71±5.51% was obtained for scenario 1, 96.0±3.14% for scenario 2, 79.11±6.99% for scenario 3 and 85.96±6.26% for scenario 4, which means that the best performances occur when comparing success with failure and also success with reintubations (which can be seen as failure). The result agrees very strongly with the Mann Whitney U test. 5 Conclusions In this study, we investigated the use of Simple Symbolic Dynamics (SSD) to assess a patient's readiness to be taken off respiratory support. We utilized Matlab for these analyses. The results from the classifiers indicated that the TO and VT series contain crucial information for distinguishing between Class 1 and Class 2 (scenery 3). However, we noted that the classification percentages obtained may be overly optimistic for real-world use, as balancing was achieved by duplicating some examples rather than excluding them. It can be concluded that the results obtained using the BGA variant of the MWVA are slightly inferior to those obtained with the BGV variant. However, this difference may be due to the statistical noise generated during random class balancing. Since the technique was limited to a unitary window width, we cannot determine the superiority of the BGV variant. To do so, it would be necessary to test the technique in at least one case where the order of the variables is inherent to the problem. Additionally, joint symbolic dynamics show promising potential for classifying patients in the "Success vs. Reintubated " classes, with highly satisfactory results. These findings suggest that considering the interaction of respiratory signals with the cardiac signal provides highly relevant information for determining the appropriate time for disconnection from mechanically assisted ventilation. References [1] R. M. Merchant et al., “Part 1: executive summary: 2020 American Heart Association guidelines for cardiopulmonary resuscitation and emergency cardiovascular care,” Circulation, vol. 142, no. 16\_Suppl\_2, pp. S337--S357, 2020. [2] A. Cheng et al., “Part 6: resuscitation education science: 2020 American Heart Association guidelines for cardiopulmonary resuscitation and emergency cardiovascular care,” Circulation, vol. 142, no. 16\_Suppl\_2, pp. S551--S579, 2020. [3] K. E. A. Burns, B. Rochwerg, and A. J. E. Seely, “Ventilator Weaning and Extubation,” Crit. Care Clin., 2024. [4] R. McDannold, B. J. Bobrow, V. Chikani, A. Silver, D. W. Spaite, and T. Vadeboncoeur, “Quantification of ventilation volumes produced by compressions during emergency department cardiopulmonary resuscitation,” Am. J. Emerg. Med., vol. 36, no. 9, pp. 1640–1644, 2018, doi: 10.1016/j.ajem.2018.06.057. [5] S. Ruiz de Gauna et al., “Characterization of mechanical properties of adult chests during pre-hospital manual chest compressions through a simple viscoelastic model,” Comput. Methods Programs Biomed., vol. 242, p. 107847, 2023, doi: https://doi.org/10.1016/j.cmpb.2023.107847. [6] J. J. Gutiérrez et al., “Contribution of chest compressions to end-tidal carbon dioxide levels generated during out-of-hospital cardiopulmonary resuscitation,” Resuscitation, vol. 179, pp. 225–232, 2022. [7] J. J. Gutiérrez et al., “Standardisation facilitates reliable interpretation of ETCO2 during manual cardiopulmonary resuscitation,” Resuscitation, vol. 200, p. 110259, 2024. [8] I. Azcarate et al., “The Role of Chest Compressions on Ventilation during Advanced Cardiopulmonary Resuscitation,” J. Clin. Med., vol. 12, no. 21, 2023, doi: 10.3390/jcm12216918. PEN Vol. 12, No. 3, December 2024, pp.604-615 614 [9] M. R. Neth, A. Idris, J. McMullan, J. L. Benoit, and M. R. Daya, “A review of ventilation in adult out‐of‐ hospital cardiac arrest,” J. Am. Coll. Emerg. Physicians Open, vol. 1, no. 3, pp. 190–201, 2020, doi: 10.1002/emp2.12065. [10] C. Robba et al., “Ventilatory settings in the initial 72 h and their association with outcome in out-of- hospital cardiac arrest patients: a preplanned secondary analysis of the targeted hypothermia versus targeted normothermia after out-of-hospital cardiac arrest (TTM2) tr,” Intensive Care Med., vol. 48, no. 8, pp. 1024–1038, 2022. [11] B. Y. Yang et al., “A pilot evaluation of respiratory mechanics during prehospital manual ventilation,” Resuscitation, vol. 177, pp. 55–62, 2022. [12] A. Fauzi, E. F. Pratama, and others, “Comparison Of The Effectiveness Of Mechanical And Manual Cpr On The Events Of Return Of Spontaneous Circulation (ROSC) In Cardiac Arrest Patients,” Batavia Community J. Heal. Sci., pp. 6–12, 2024. [13] C. Girault, I. Daudenthun, V. Chevron, F. TAMION, J. LEROY, and G. U. Y. Bonmarchand, “Noninvasive ventilation as a systematic extubation and weaning technique in acute-on-chronic respiratory failure: a prospective, randomized controlled study,” Am. J. Respir. Crit. Care Med., vol. 160, no. 1, pp. 86–92, 1999. [14] D. R. Ziehr et al., “Respiratory pathophysiology of mechanically ventilated patients with COVID-19: a cohort study,” Am. J. Respir. Crit. Care Med., vol. 201, no. 12, pp. 1560–1564, 2020. [15] A. B. B. Arcanjo and L. M. Beccaria, “Factors associated with extubation failure in an intensive care unit: a case-control study,” Rev. Lat. Am. Enfermagem, vol. 31, p. e3864, 2023. [16] C. Arizmendi, J. Reinemer, H. Gonzalez, and B. Giraldo Giraldo, “Diagnosis of patients with chronic heart failure implementing wavelet transform and machine learning techniques,” Int. J. Electr. Comput. Eng. 2024, 14, 4, 4577, 2024. [17] B. F. Giraldo, J. Rodriguez, P. Caminal, A. Bayés-Gen\’\is, and A. Voss, “Cardiorespiratory and cardiovascular interactions in cardiomyopathy patients using joint symbolic dynamic analysis,” in 2015 37th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), 2015, pp. 306–309. [18] H.-N. Shen et al., “Changes of heart rate variability during ventilator weaning,” Chest, vol. 123, no. 4, pp. 1222–1228, 2003. [19] R. B. da Silva, V. R. Neves, U. R. Montarroyos, M. S. Silveira, and D. C. Sobral Filho, “Heart rate variability as a predictor of mechanical ventilation weaning outcomes,” Hear. \& Lung, vol. 59, pp. 33– 36, 2023. [20] L. S. Correa, E. Laciar, V. Mut, B. F. Giraldo, and A. Torres, “Multi-parameter analysis of ECG and Respiratory Flow signals to identify success of patients on weaning trials,” in 2010 Annual International Conference of the IEEE Engineering in Medicine and Biology, 2010, pp. 6070–6073. [21] C. I. Ossai and N. Wickramasinghe, “Intelligent decision support with machine learning for efficient management of mechanical ventilation in the intensive care unit--a critical overview,” Int. J. Med. Inform., vol. 150, p. 104469, 2021. [22] D. A. Lind, D. Lind, and B. Marcus, An introduction to symbolic dynamics and coding. Cambridge university press, 2021. [23] C. Arizmendi, A. Vellido, and E. Romero, “Frequency selection for the diagnostic characterization of human brain tumours,” in Artificial Intelligence Research and Development, IOS Press, 2009, pp. 391– 398. [24] B. Cairo, V. Bari, F. Gelpi, B. De Maria, and A. Porta, “Assessing cardiorespiratory interactions via lagged joint symbolic dynamics during spontaneous and controlled breathing,” Front. Netw. Physiol., vol. 3, 2023. [25] C. J. Arizmendi, E. H. Solano, H. Gonzalez, H. G. Acuña, and B. F. Giraldo, “Analysis of cardiorespiratory interaction in patients submitted to the T-tube test in the weaning process implementing symbolic dynamics and neural networks,” in 2018 international conference on artificial intelligence and big data (ICAIBD), PEN Vol. 12, No. 3, December 2024, pp.604-615 615 2018, pp. 101–105. [26] J. I. Trapero, C. J. Arizmendi, C. A. Forero, S. K. Lopez, and B. F. Giraldo, “Cardiorespiratory interaction using nonlinear data processing techniques in patients undergoing test tube t,” in VII Latin American Congress on Biomedical Engineering CLAIB 2016, Bucaramanga, Santander, Colombia, October 26th- 28th, 2016, 2017, pp. 465–468. [27] M. Z. I. Chowdhury and T. C. Turin, “Variable selection strategies and its importance in clinical prediction modelling,” Fam. Med. community Heal., vol. 8, no. 1, 2020. [28] C.-H. Wu et al., “Automatic tube compensation for liberation from prolonged mechanical ventilation in tracheostomized patients: A retrospective analysis,” J. Formos. Med. Assoc., 2023. [29] J. Pinto, H. González, C. Arizmendi, H. González, Y. Muñoz, and B. F. Giraldo, “Analysis of the Cardiorespiratory Pattern of Patients Undergoing Weaning Using Artificial Intelligence,” Int. J. Environ. Res. Public Health, vol. 20, no. 5, p. 4430, 2023. [30] T. Hastie, R. Tibshirani, and R. Tibshirani, “Best subset, forward stepwise or lasso? Analysis and recommendations based on extensive comparisons,” Stat. Sci., vol. 35, no. 4, pp. 579–592, 2020.