Next Article in Journal
Distributionally Robust Multivariate Stochastic Cone Order Portfolio Optimization: Theory and Evidence from Borsa Istanbul
Previous Article in Journal
A Feature Engineering Framework for Smart Meter Group Failure Rate Prediction
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

An Analysis of Hybrid Management Strategies for Addressing Passenger Injuries and Equipment Failures in the Taipei Metro System: Enhancing Operational Quality and Resilience

by
Sung-Neng Peng
1,
Chien-Yi Huang
1,
Hwa-Dong Liu
2,* and
Ping-Jui Lin
3
1
Department of Industrial Engineering and Management, National Taipei University of Technology, Taipei 106, Taiwan
2
Undergraduate Program of Vehicle and Energy Engineering, National Taiwan Normal University, Taipei 106, Taiwan
3
Graduate Institute of AI Interdisciplinary Applied Technology, National Taiwan Normal University, Taipei 106, Taiwan
*
Author to whom correspondence should be addressed.
Mathematics 2025, 13(15), 2470; https://doi.org/10.3390/math13152470
Submission received: 14 June 2025 / Revised: 5 July 2025 / Accepted: 28 July 2025 / Published: 31 July 2025

Abstract

This study is the first to systematically integrate supervised machine learning (decision tree) and association rule mining techniques to analyze accident data from the Taipei Metro system, conducting a large-scale data-driven investigation into both passenger injury and train malfunction events. The research demonstrates strong novelty and practical contributions. In the passenger injury analysis, a dataset of 3331 cases was examined, from which two highly explanatory rules were extracted: (i) elderly passengers (aged > 61) involved in station incidents are more likely to suffer moderate to severe injuries; and (ii) younger passengers (aged ≤ 61) involved in escalator incidents during off-peak hours are also at higher risk of severe injury. This is the first study to quantitatively reveal the interactive effect of age and time of use on injury severity. In the train malfunction analysis, 1157 incidents with delays exceeding five minutes were analyzed. The study identified high-risk condition combinations—such as those involving rolling stock, power supply, communication, and signaling systems—associated with specific seasons and time periods (e.g., a lift value of 4.0 for power system failures during clear mornings from 06:00–12:00, and 3.27 for communication failures during summer evenings from 18:00–24:00). These findings were further cross-validated with maintenance records to uncover underlying causes, including brake system failures, cable aging, and automatic train operation (ATO) module malfunctions. Targeted preventive maintenance recommendations were proposed. Additionally, the study highlighted existing gaps in the completeness and consistency of maintenance records, recommending improvements in documentation standards and data auditing mechanisms. Overall, this research presents a new paradigm for intelligent metro system maintenance and safety prediction, offering substantial potential for broader adoption and practical application.

1. Introduction

In the densely populated greater Taipei area of Taiwan, both students and office workers are constantly engaged in their respective routines. In such a fast-paced urban environment, the development of a rapid, convenient, and safe transportation system is particularly vital. The Taipei rapid transit corporation (TRTC) serves as a key provider of transportation services for residents in this region [1,2]. As Taiwan’s first metropolitan rapid transit system, Taipei Metro is operated by TRTC, while the planning and construction of routes are primarily overseen by the department of rapid transit systems (DORTS) under the Taipei city government.
Since its inauguration in 1996, Taipei Metro has recorded a cumulative ridership exceeding 10 billion passenger trips, with daily ridership frequently surpassing two million. With increasing demand, the metro system has become a critical mode of transportation for residents in greater Taipei. In order to safeguard passenger rights and enhance overall service quality, TRTC has actively adopted big data analytics to improve operational safety and efficiency. For instance, track intrusion incidents—which were relatively frequent in the early stages—have been significantly reduced following the full installation of platform screen doors, and such incidents have become virtually nonexistent in recent years. However, passenger injuries still occasionally occur in non-train areas such as escalators and pedestrian walkways.
On the other hand, based on an analysis of 183 complete incident reports from the medium-capacity system (Brown line), 104 of the equipment failures were attributed to the train units themselves, while the remaining cases were caused by external factors or signal malfunctions. Through data-driven analysis and real-time response mechanisms, Taipei Metro has demonstrated its ability not only to swiftly resolve disruptions but also to effectively prevent future incidents.
As transportation modes continue to diversify, an increasing number of commuters are opting for public transit systems, with metro services becoming the primary choice for many [3,4,5,6]. The 2021 Taroko Express train accident [7], one of the most severe railway disasters in Taiwan’s history, resulted in significant casualties and sparked widespread concern over transportation safety. Whether in conventional railways, high-speed rail, or metro systems, the challenge of high passenger volume places non-negotiable demands on safety. Any accident could lead to severe consequences, undermining public trust and operational performance. Therefore, this study focuses on the Taipei Metro system, with particular emphasis on passenger injury incidents and train failure-related delays. The objective is to analyze potential areas for improvement in equipment and infrastructure, and to propose preventive and responsive strategies that can reduce accident rates and minimize service disruptions, thereby enhancing the overall safety and reliability of metro operations.
In the fields of management and engineering, decision trees and association rule mining are widely adopted analytical methods. The following provides a concise overview of recent research in this field. Decision tree algorithms have been widely applied across diverse engineering domains, ranging from data classification to the development of complex decision support systems, as demonstrated in numerous studies [8,9,10,11]. Decision trees are particularly valued for their intuitive structure and effectiveness in extracting actionable decision-making rules from large datasets. In 2024, Zein et al. addressed the accelerating pace of biomedical data generation and collection, which has led to increasingly distributed datasets across hospitals, research institutions, and other organizations. In response, they proposed PrivaTree, a highly efficient and privacy-preserving collaborative training protocol tailored for decision tree modeling on horizontally partitioned biomedical datasets [8]. Also in 2024, Liu et al. examined parking technologies within smart, interconnected transportation systems. Their work aimed to reduce computational complexity while enhancing adaptability and safety in vertical parking systems. They developed a data-driven trajectory planning algorithm based on decision trees, integrating numerical optimization with machine learning to accurately estimate and achieve optimal parking paths [9]. In 2023, Zhang et al. introduced a novel interpretable model for high-speed rail delay prediction. Their approach combined graph community neural networks with time-series fuzzy decision trees, effectively capturing spatiotemporal dynamics, community structures of train routes, and multiple influencing factors at high-speed rail stations [10]. Similarly, in 2023, Guglielmo et al. explored the growing use of behavior trees in robotics applications. They advanced this method by applying decision tree learning in conjunction with logic factorization techniques borrowed from circuit design. This approach improved the precision of behavioral modeling and supported further development in robotic systems [11].
Association rules: Studies [12,13,14] highlight the application of association rule mining techniques to uncover and interpret hidden patterns and correlations among frequently co-occurring items in large datasets. These rules have proven particularly valuable in domains such as market basket analysis and risk management. In 2024, Siswanto et al. introduced a novel algorithm known as set difference frequent pattern (SDFP-growth), which eliminates the need for manually predefining minimum support thresholds. The SDFP-growth algorithm performs dimensionality reduction on the original dataset and generates smaller first- and second-layer data subsets. Through this process, it can automatically produce frequent itemsets that satisfy optimal minimum support thresholds, thereby enhancing the accuracy and efficiency of data analysis [12]. In 2022, Darwish et al. addressed the issue of data cleansing in medical datasets by proposing a privacy-preserving mechanism based on metaheuristic optimization. Specifically, they applied a hybrid approach that combines tabu search with genetic algorithms to select appropriate itemsets for removal from transactions that meet sensitive negative conditions. The primary objective was to minimize modifications to the original database while supporting the integration of privacy preservation with data mining applications [13]. Also in 2022, Yu proposed a quantum algorithm for association rule mining, featuring high-speed search capabilities. The algorithm is designed to efficiently locate and extract frequent itemsets within transactional databases on medium-scale quantum devices or general-purpose fault-tolerant quantum computers. This work demonstrates the potential advantages of quantum computing in advancing the field of data mining [14].
In addition, this study compares the adopted decision tree algorithm with other commonly used classification algorithms, including random forest and gradient boosting [15,16], as shown in Table 1. Given the emphasis on interpretability and practical applicability in risk prediction, the decision tree was selected as the primary classification model. It offers clear logic, ease of communication, and effective visualization, making it well-suited for real-world implementation.
Building upon the aforementioned literature, decision tree and association rule techniques have been widely adopted in the fields of management and engineering, demonstrating high efficiency and practicality in complex decision analysis and pattern mining tasks. This study focuses on the Taipei Metro system, where daily ridership continues to increase, underscoring its critical role in urban transportation. However, the occurrence of system failures and operational anomalies remains a challenge to service stability. To explore the underlying factors and emerging trends of such incidents, this study employs an integrated data mining approach using decision trees and association rules. The objective is to uncover hidden relationships between the causes of incidents and their associated conditions, thereby supporting accident prevention and enhancing response effectiveness. Ultimately, the aim is to reduce operational risks and minimize potential losses for the metro system.
The primary objectives and expected contributions of this research are as follows:
(i)
To analyze the probability of incident occurrence under specific conditions and identify influential factors.
(ii)
To propose actionable recommendations that assist the Taipei Metro corporation in strengthening its preventive mechanisms for passenger injury events.
(iii)
To provide predictive maintenance and early-warning strategies for train malfunctions, thereby improving overall system reliability and safety.

2. Introduction to Decision Trees and Association Rules

This study observes that the daily ridership of the Taipei Metro corporation has continued to increase, reflecting the growing demand for public transportation services. However, operational failures and anomalies still occur frequently within the metro system. To investigate the potential causes behind these incidents more thoroughly, in addition to traditional statistical charts for trend analysis, this study incorporates big data analytics to further examine the factors that may disrupt normal operations.
By applying data mining techniques such as decision trees and association rules, the research enables a rapid response and swift resolution of service disruptions when accidents occur. These methods are intended to reduce train delays, minimize operational losses, and ultimately enhance overall efficiency and service quality in metro system operations.

2.1. Introduction to Decision Trees

Decision trees are a supervised learning-based data mining technique that serve both feature extraction and classification purposes. The fundamental principle involves selecting the most discriminative input variables based on a target variable, using these to recursively split the dataset, and representing the resulting classification rules and hierarchical logic in a tree-like structure. Once trained and pruned, the decision tree model can be used not only for data exploration but also for predictive analysis, thereby revealing the layered relationships between the target variable and its associated predictors.
A decision tree operates by repeatedly partitioning the dataset into two subsets based on selected features, with the goal of maximizing homogeneity within subsets and enhancing differentiation between them. At each node, the algorithm chooses the most representative feature as the splitting criterion to improve the purity of the resulting subsets. Commonly used feature selection metrics include Information Gain and the Gini index [17,18,19], which assess both the importance and classification effectiveness of a feature.
In the structure of a decision tree, leaf nodes represent terminal nodes at the bottom level of the tree—nodes that are no longer split. In classification tasks, a leaf node corresponds to a specific class label, indicating that all instances falling into that node belong to the same category. In regression tasks, it corresponds to a predicted numerical value, which serves as the estimated output for all instances assigned to that node. Therefore, leaf nodes represent the final output predictions of the decision tree.
In this study, the decision tree method is adopted for data analysis and pattern construction. The process begins by feeding the training data into the model. If the stopping conditions are not yet met, the algorithm continues to search for the optimal splitting feature and generate new nodes. This process repeats until no further splits are possible, resulting in a fully grown decision tree. Subsequently, the testing data is input into the trained decision tree model to evaluate its classification accuracy and predictive performance. The overall construction and analysis procedure is illustrated in Figure 1.
A.
Introduction to pruning strategies
The primary objective of pruning is to prevent overfitting in decision tree models. During the training process, a decision tree may grow excessively complex by continuously splitting nodes in an effort to perfectly classify the training data. This often leads to an overfitted model that performs well on training data but lacks generalization capability for unseen data.
Pruning strategies for decision trees are generally categorized into two main types: pre-pruning and post-pruning [20].
(A)
Pre-pruning:
Pre-pruning involves introducing stopping criteria during the construction of the decision tree. When certain thresholds are met, further splitting is halted to restrict excessive tree growth. This method is typically applied during the training phase and requires tuning of hyperparameters to optimize model performance. Common pre-pruning conditions include the following:
(i)
The number of samples at a node is below a predefined threshold.
(ii)
The tree has reached a maximum specified depth.
(iii)
The difference in sample distribution between parent and child nodes is statistically insignificant.
While pre-pruning can effectively reduce the risk of overfitting, improperly chosen constraints may result in underfitting. Therefore, techniques such as cross-validation are essential for tuning hyperparameters and selecting the optimal model configuration to achieve the best predictive performance.
(B)
Post-pruning:
The key distinction between post-pruning and pre-pruning lies in their timing. Post-pruning is applied after the entire decision tree has been fully grown. It simplifies the model structure to improve its generalization on unseen data, particularly in cases of overfitting. The typical procedure involves removing certain leaf nodes and converting their parent nodes into new leaf nodes. This simplification helps streamline decision logic and avoids excessive fitting to the training data.
Post-pruning typically involves the following steps:
(i)
Select a target leaf node for pruning to generate a simplified decision tree structure.
(ii)
Evaluate the impact of the pruning on model performance using methods such as cross-validation.
(iii)
If the model’s generalization ability improves after the node is removed, retain the pruning operation and designate the parent node as a new leaf node.
Compared to pre-pruning, the advantage of post-pruning lies in its ability to preserve as much information from the training data as possible. It avoids premature termination of splits, which may otherwise degrade model performance. However, this approach is computationally more expensive, as it requires evaluating each node individually. Therefore, post-pruning is more suitable for analytical scenarios where high model accuracy is essential.
(C)
Minimum cost complexity pruning
Minimum cost complexity pruning is a widely used technique aimed at preventing overfitting in decision trees and enhancing their generalization capability on unseen data. This method utilizes a cost complexity function to jointly assess the model’s prediction error and structural complexity, thereby identifying optimal pruning points to simplify the tree.
The core objective is to minimize the structural complexity of the model while maintaining a high level of predictive accuracy. A common form of the cost function is expressed as follows:
R α T = R T + α | T ~ |
Here, R(T) represents the total prediction error of the decision tree T, | T ~ | denotes the number of leaf nodes in the tree, and α is the regularization parameter, which balances the trade-off between prediction error and model complexity.
When α is small, the algorithm tends to retain a more complex model to improve accuracy; conversely, a larger α favors a simpler tree structure to prevent overfitting.
By performing iterative testing and cross-validation with various values of α, a series of candidate pruning points can be identified. The pruning result that minimizes the cost complexity function Rα(T) is then selected as the final model structure.
(D)
Data balancing techniques
Oversampling is a commonly used data balancing technique in machine learning, primarily employed to address the issue of class imbalance. When one class in a dataset is significantly underrepresented compared to others, machine learning models tend to favor the majority class during training, resulting in reduced prediction accuracy for the minority class. To mitigate this issue, oversampling methods increase the number of samples in the minority class, thereby balancing the class distribution and enhancing the model’s ability to recognize underrepresented patterns.
Upsampling refers to the process of increasing the number of samples in the minority class [21], making it more comparable to the majority class in terms of sample size. This approach strengthens the learning of features specific to the minority class and improves prediction performance. Upsampling methods may involve either duplicating existing samples or generating synthetic samples using techniques such as synthetic minority oversampling technique (SMOTE).
In contrast, downsampling involves reducing the number of samples in the majority class [21] to achieve a relative balance with the minority class. Common approaches include random deletion of majority class samples or the selection of representative subsets based on specific criteria, such as distance metrics or information entropy. The goal of downsampling is to eliminate redundant information from the majority class, reduce computational burden during training, and enhance overall model efficiency and generalization performance.
B.
Decision tree classifier
The Decision tree classifier is Scikit-learn’s implementation of the decision tree algorithm tailored for classification tasks (see Appendix A) [22]. Its core principle involves recursively partitioning the dataset based on feature values to construct a hierarchical tree structure for classification. Users can configure various model parameters—such as maximum tree depth (max_depth), splitting criteria (e.g., Gini index or information gain), and minimum number of samples per node—to optimize the classifier’s accuracy and generalization performance.
In addition, the decision tree classifier supports visualization capabilities, enabling users to graphically display the full tree structure and node-splitting logic. This enhances model interpretability and facilitates result explanation. The classifier is capable of handling datasets containing both numerical and categorical features and can be applied to both multiclass and binary classification tasks. Its strengths lie in its ability to identify the most discriminative features from the data and to provide fast, interpretable predictions for new instances.
C.
Gini impurity
Gini impurity is one of the commonly used splitting criteria in decision tree algorithms, designed to measure the degree of impurity within a node’s data samples [22]. It evaluates how mixed the classes are within a given node, helping to determine whether the node should be further split.
Assuming a dataset D contains K distinct classes, and let pj represent the probability that a randomly selected sample belongs to class j, the Gini impurity is defined as follows:
G i n i D = 1 j = 1 k p j 2
When a dataset D is split into two subsets D1 and D2 based on an attribute A, the weighted Gini impurity after the split can be calculated as
G i n i A D = D 1 | D | · G i n i D 1 + D 2 | D | · G i n i D 2
The reduction in Gini impurity, representing the improvement in classification purity due to the split by attribute A, is defined as
G i n i A = G i n i D G i n i A D
A larger value of ΔGini(A) indicates that attribute A yields a more effective split at the node and is therefore a strong candidate for node division. The Gini impurity value ranges between 0 and 1. A value close to 0 implies high purity, meaning that most samples in the node belong to the same class. Conversely, a value near 1 indicates a more heterogeneous distribution, suggesting lower purity.
Compared to entropy, which is another commonly used splitting criterion, Gini impurity is computationally more efficient since it does not involve logarithmic calculations. Additionally, Gini impurity is often more sensitive to changes in the distribution of minority classes, making it particularly advantageous when handling imbalanced classification problems.
D.
Model evaluation metrics
To assess the performance and predictive capability of the classification model, this study adopts several commonly used evaluation metrics, as described below.
(A)
Accuracy:
Accuracy is a fundamental metric used to evaluate the proportion of correctly predicted samples within the test dataset. It reflects the overall correctness of the model’s predictions. The accuracy is calculated as the number of correctly predicted samples divided by the total number of test samples, then multiplied by 100 to express the result as a percentage:
A c c u r a c y = N u m b e r   o f   c o r r e c t   p r e d i c t i o n s T o t a l   n u m b e r   o f   s a m p l e s × 100
(B)
Feature importance:
Feature importance is a metric used to assess the contribution of each input variable to the model’s prediction results. By analyzing feature importance, one can identify which variables have the most significant impact on the model’s classification decisions. A higher value indicates greater influence, making this metric useful for feature selection and model simplification in subsequent analyses.
(C)
Confusion matrix:
A confusion matrix is used to display the correspondence between the predicted outcomes and the actual labels of a classification model. It is a key tool for evaluating model performance across different classes [23,24,25]. In the matrix, rows represent actual classes while columns represent predicted classes. The matrix clearly illustrates classification results such as True Positives (TP), False Positives (FP), True Negatives (TN), and False Negatives (FN). The confusion matrix used in this study is shown in Table 2.
The four components of the confusion matrix are defined as follows:
(i)
True positive (TP): The number of samples that are actually positive and correctly predicted as positive by the model.
(ii)
True negative (TN): The number of samples that are actually negative and correctly predicted as negative by the model.
(iii)
False positive (FP): The number of samples that are actually negative but incorrectly predicted as positive by the model. This is also referred to as a Type I error.
(iv)
False negative (FN): The number of samples that are actually positive but incorrectly predicted as negative by the model. This is also known as a Type II error.
Additional commonly used classification evaluation metrics include the following:
Precision: Measures the proportion of correctly predicted positive samples among all samples predicted as positive. It is calculated as
P r e c i s i o n = T P T P + F P
Recall: Measures the proportion of actual positive samples that are correctly identified by the model. It is calculated as
R e c a l l = T P T P + F N

2.2. Association Rules

Data mining refers to a technique that extracts meaningful patterns and rules from large datasets through automated or semi-automated processes. Among the various data mining methods, association rule analysis is one of the most common and widely applied approaches [26,27,28]. This method is particularly effective in uncovering potential relationships between events and their causes, revealing hidden correlations among variables, and providing actionable insights for decision support.
In this study, association rule mining is applied to analyze metro system incident records, aiming to identify potential causal relationships among various accident factors. The derived rules can serve as a reference for maintenance personnel, helping to reduce diagnosis time, improve repair efficiency and system quality, and ultimately achieve fault prevention and risk control.
The core concept of association rule analysis lies in discovering dependencies among attributes (fields) within large datasets. The evaluation of these rules is primarily based on three key indicators: Support, confidence, and lift. These metrics are essential for identifying statistically and practically significant rules. As illustrated in Figure 2, their definitions are as follows:
A.
Support:
Support measures the probability that both item X and item Y occur together. It is defined as
Support(X ⇒ Y) = P(X ∩ Y)
This represents the proportion of records where X and Y appear simultaneously out of the total dataset. A minimum support threshold is typically set to filter out infrequent and non-representative rules.
B.
Confidence:
Confidence indicates the conditional probability that Y occurs given that X has occurred. It is defined as
C o n f i d e n c e ( X Y ) = P ( X Y ) P ( X )
C.
Lift:
Lift evaluates whether the occurrence of X significantly increases the likelihood of Y, compared to the baseline probability of Y occurring alone. It is defined as
L i f t ( X Y ) = P ( X | Y ) P ( Y )
When Lift > 1, it suggests that the occurrence of X contributes positively to the occurrence of Y, indicating a significant and potentially meaningful association. Lift is especially useful for distinguishing causal relationships from mere statistical correlations.
Decision-makers can apply threshold values—such as minimum support, minimum confidence, and minimum lift—to filter and rank the discovered rules. This enables the selection of the most interpretable and practically valuable association rules, which can be used for operational decision-making or the design of early-warning systems.

2.3. Applications of Association Rules

Research on association rules generally focuses on two main objectives: (i) developing efficient algorithms for association rule mining, and (ii) accurately and rapidly extracting meaningful relationships from large-scale databases. In this study, association rule techniques are applied to the operation and maintenance management of the Taipei Metro corporation. The applications are detailed as follows:
A.
Electromechanical systems
Electromechanical systems include power supply, air conditioning, fire protection, elevators, and utility infrastructure. Power outages directly affect the functionality of all downstream equipment; air conditioning failures compromise passenger comfort; fire protection systems are critical to public safety and passenger life protection; elevator and utility malfunctions affect vertical mobility and basic services within stations. These systems are highly interdependent—failures in any component can impact metro operations and passenger safety.
B.
Rolling stock systems
Rolling stock forms the core of metro transportation and relies on the coordinated functioning of electrical, signaling, communications, civil, and electromechanical systems. The vehicle system is closely linked to track switches, third-rail power supply, and roadside equipment. Malfunctions in any of these subsystems may cause train service disruptions.
C
Operation control center
The operation control center (OCC) functions as the “central nervous system” of the metro system, responsible for coordinating subsystems such as rolling stock, electromechanical, civil, and electrical systems. Upon issuing commands, all subsystems must respond immediately. Any execution error may lead to serious operational incidents. Therefore, OCC staff must undergo psychological assessments and field-based training across all subsystems to ensure real-time decision-making and crisis response capabilities.
D.
Civil engineering systems
This system encompasses structural works, track infrastructure, and surrounding facilities, all of which are closely integrated with power, signaling, communication, and rolling stock systems. Design factors such as station layout, stair and ramp configuration, and track stability may directly or indirectly affect vehicle stability and passenger safety.
E.
Station operations
The responsiveness of station staff is crucial for both passenger service and emergency handling. In the event of equipment failure or a medical emergency, personnel must follow standard operating procedures (SOPs). For instance, contacting emergency services (119), assisting visually impaired passengers, or addressing abnormal behavior within train cars all require immediate coordination with the OCC to ensure rapid and risk-minimized responses.
F.
Electrical systems and integrated applications
Association rule analysis can be used to identify optimal interactions between the electromechanical system and other subsystems, thereby enhancing overall transportation safety. For example, when the fire alarm system is triggered, coordinated responses involving station staff, train operators, and the OCC must be executed promptly. In critical situations, operational strategies such as non-stopping trains or shuttle bus dispatch may be implemented to facilitate evacuation and alternative transport, thus reducing risks and mitigating potential impacts.

3. Hybrid Management Strategy Analysis

3.1. Analysis of Passenger Injury Patterns Using Decision Trees

As part of the research methodology, this study employs supervised learning—specifically, the decision tree algorithm from big data analytics—as a tool for further exploration of the problem. The decision tree model is implemented using Python 3.12 (see Appendix A). The objective is to apply decision tree analysis to classify and interpret patterns in Taipei Metro passenger injury incidents, with variables such as time period, age, gender, location of occurrence defined as feature variables (X), and injury severity as the target variable (Y).
To enhance the analyzability of the dataset, a data preprocessing stage was conducted. Time periods were categorized into peak, off-peak, and weekend classes; age was treated as a continuous variable; locations were classified into nine contextual categories (e.g., platform, train car, ground level); injury severity was divided into minor, moderate, and severe levels; and gender was treated as a binary variable. This preprocessing strategy facilitates the construction and interpretation of the decision tree model, as summarized in Table 3 and Table 4.
First, the structured feature dataset must be imported into Python. Since machine learning models in Python cannot directly process categorical variables, it is necessary to convert both the target variable and the feature variables into dummy variables. The target variable, degree of injury, possesses a clear ordinal relationship and is thus treated as an ordinal variable. Therefore, this study utilizes the LabelEncoder module to encode the values “mild,” “moderate,” and “severe” into 0, 1, and 2, respectively.
In contrast, the feature variables are nominal (unordered categorical variables). To avoid the model mistakenly assuming an ordinal relationship, one-hot encoding is applied to transform them into dummy variables.
Once data preprocessing is completed, model training can proceed. Before building the model, the injury dataset is divided into a training set and a test set using an 80:20 split ratio. The training data is then fed into the DecisionTreeClassifier model to train and construct the decision tree.
Next, the trained model is used to make predictions on the test set, and the prediction accuracy is calculated. Experimental results indicate that the model achieved an accuracy of approximately 68%, which falls short of the ideal performance level. As a result, the study further analyzes the feature importance scores provided by the decision tree model to evaluate the contribution of each feature to the prediction outcome. This analysis guides feature selection and model optimization to improve overall predictive performance.
As shown in Table 5, feature importance is determined by the model based on how frequently and effectively each feature is used for splitting during training. The results reveal that the lower-ranked features are mostly from the variable “type of incident”, with some categories contributing nothing to the model (i.e., feature importance equals zero). For the sake of performance enhancement and model simplification, this study decides to remove the “type of incident” feature, thereby eliminating low-contribution variables that could negatively affect model accuracy.
In addition to simplifying feature variables through feature engineering, this study also identified another potential factor affecting the accuracy of the decision tree model: data imbalance. The injury data categorize the target variable into three levels of severity: (i) mild injury, which includes cases such as abrasions, swelling, or no visible external injury; (ii) moderate injury, which includes fractures, dislocations, or individuals aged 60 and above who were transported to the hospital by ambulance; and (iii) severe injury, which includes serious conditions such as heavy bleeding or loss of consciousness. As shown in Table 6, among the total of 3331 records, 2188 are classified as mild injuries, 1058 as moderate injuries, and only 85 as severe injuries, indicating a clear imbalance in class distribution.
Data imbalance may cause the model to become biased toward predicting the majority class during training, thereby weakening its ability to recognize and classify minority classes. As a result, even if the model achieves acceptable overall accuracy, its predictive performance for underrepresented categories—such as severe injuries—may deteriorate significantly. This compromises the model’s capacity to accurately learn the distinguishing patterns of minority classes, thereby reducing its practical applicability and reliability in real-world deployments.
To address the issue of data imbalance, this study adopts an oversampling technique. Specifically, the method used is duplicate sampling, which involves randomly replicating samples from minority classes to increase their quantity, thereby achieving a more balanced class distribution.
Oversampling not only balances the dataset but also enhances the model’s ability to learn. In situations where class distributions are highly skewed, models tend to favor predictions toward the majority class, resulting in poor predictive performance for minority classes. By increasing the number of samples in the minority class, oversampling not only balances the dataset but also enhances the model’s ability to learn and accurately predict these underrepresented categories.
As shown in Table 7, this study duplicates the original samples from the severe injury and moderate injury classes to bring their sample sizes closer to that of the majority (mild injury) class. This increases the model’s sensitivity to minority classes during training and improves their relative contribution to the learning process. Consequently, this helps boost the model’s overall accuracy and stability in classifying minority cases.
After applying the aforementioned feature engineering and oversampling techniques, the dataset was reprocessed through the decision tree model for training and testing. The results show that the model’s accuracy improved to 81%, indicating a significant enhancement compared to the original model.
To further evaluate the overall performance of the decision tree classifier, several commonly used evaluation metrics were calculated and analyzed. First, a confusion matrix was constructed, as shown in Table 8, followed by the computation of key classification metrics such as precision and recall. These metrics provide a more comprehensive understanding of the model’s predictive performance across different injury severity levels.
Precision and recall values are summarized in Table 9. Overall, the model demonstrates strong performance across all categories in terms of both precision and recall, indicating that it possesses stable and reliable predictive capabilities for classifying cases of mild, moderate, and severe injuries.
Following the construction of the decision tree model, visualization was conducted to better understand its structure, as shown in Figure 3. The analysis reveals that the model is highly complex, with a depth of 20 layers and a total of 616 nodes. Such complexity not only makes the model difficult to interpret and explain but also hinders the extraction of clear, actionable rules.
To enhance the interpretability and conciseness of the model, this study further applied post-pruning to simplify the decision tree structure. Based on the pruned model, a set of representative and practically applicable classification rules was derived.
This study adopts minimal cost complexity pruning as the pruning method. This approach regulates the extent of pruning and structural simplification by adjusting the cost complexity hyperparameter α (alpha). After multiple rounds of testing and comparison, the optimal value of α was determined to be 0.05. This setting effectively simplifies the model structure, resulting in a more compact decision tree that facilitates subsequent rule extraction and analysis. Moreover, it enhances the interpretability and practical applicability of the model.
As shown in Figure 4, the structure of the decision tree has been significantly simplified following the pruning process, enabling clearer extraction of classification rules. This study further organizes the key classification rules and, based on their content, proposes preliminary recommendations for injury prevention strategies in the Taipei Metro system. Using a dataset of approximately 3331 passenger injury records, the model was trained to uncover potential relationships between various feature variables and the degree of injury, as well as to identify distribution patterns and potential risk factors associated with passenger injuries.
A.
Key extracted classification rules:
(A)
IF age ≤ 61 AND time period = off-peak AND location = escalator, then the injury is classified as severe.
(B)
IF age > 61 AND sex = male, then the injury is classified as severe.
(C)
IF age > 61 AND sex = female, then the injury severity is classified as moderate.
B.
Interpretation and practical implications:
(A)
Elderly male passengers (over 61 years old) show a higher likelihood of severe injuries. Enhanced safety education and targeted protection measures should be implemented for this demographic.
(B)
While elderly females exhibit slightly lower injury severity compared to males, the injuries are still predominantly moderate, suggesting that this group also represents a potential high-risk population.
(C)
Younger or middle-aged passengers using escalators during off-peak hours may also experience severe injuries. This underscores the importance of evaluating escalator safety and enhancing monitoring and maintenance measures during such time periods.
C.
Recommendations for improvement
(A)
Based on the rules extracted in this study, it was found that passengers aged over 61, regardless of gender, have a relatively higher likelihood of experiencing moderate or severe injuries in the metro system. It is recommended that metro operators enhance care and support measures for elderly passengers. These may include deploying additional staff during peak hours to proactively assist older adults with boarding and alighting, and offering guidance and physical support services. Furthermore, designated waiting zones or priority boarding areas for elderly passengers can be established, along with the installation of more seating to improve both safety and comfort during travel.
(B)
For passengers in younger age groups—including children, adolescents, adults, and middle-aged individuals—the risk of severe injury is also elevated when incidents occur in escalator areas during off-peak hours. This study speculates that individuals in these demographics often use electronic devices (e.g., smartphones, tablets, earphones) while commuting, which may lead to reduced attention and increase injury risk. In contrast, elderly passengers are less likely to use such devices and are typically more focused on their surroundings while moving.
Based on this inference, it is recommended that metro authorities strengthen escalator safety management, including the following actions:
(i)
Conduct regular inspections and maintenance of escalator equipment to ensure proper functioning and compliance with safety standards.
(ii)
Install clearly visible warning signs and pictograms reminding passengers to stay attentive and avoid distractions while using escalators.
(iii)
Consider installing smart monitoring systems in designated escalator zones to detect abnormal behaviors and provide real-time alerts.

3.2. Application of Association Rule Mining to Analyze EMU Fault Patterns

The research methodology is divided into two parts: (i) the medium-capacity system (Brown line), and (ii) the high-capacity system (including the Blue, Red, and Green lines).
For each system, the data was first cleaned and preprocessed, followed by the clear definition of target attributes and input attributes.
All fault events were initially categorized by their corresponding main subsystem, resulting in six major classes:
(i)
Power supply/electrical system faults.
(ii)
Signaling faults.
(iii)
Track faults.
(iv)
External factors.
(v)
Communication faults.
(vi)
EMU (Electric Multiple Unit) faults.
Among these, EMU fault was defined as the target attribute for prediction in this study, while season, time of day, and weather conditions were selected as input attributes.
The variable settings are as follows:
(i)
Season was categorized into four groups according to Taiwan’s climatic patterns:
Spring (March–May), Summer (June–August), Autumn (September–November), and Winter (December–February).
(ii)
Time of day was divided into four periods based on metro operating hours:
Early morning (00:00–06:00), morning (06:00–12:00), afternoon (12:00–18:00), and evening (18:00–24:00).
(iii)
Weather was classified into three categories based on data source:
Sunny, cloudy, and rainy.
This study aims to conduct data exploration and analysis based on the above classification framework, with the goal of uncovering potential associations between input attributes and the target attribute. The ultimate objective is to generate preventive recommendations that support fault prediction and risk management.
In contrast to the earlier section, which focused on classification analysis using decision trees, this part of the study emphasizes identifying the key associative factors underlying fault occurrences. Therefore, the association rule mining technique—widely used in big data analytics—is adopted to extract meaningful patterns from historical datasets. The derived rules are intended to provide practically applicable insights that can inform operational management and system improvement strategies for the Taipei Metro corporation.
The following sections present the results for the two subsystems, beginning with the analysis of the medium-capacity system (Brown line).
A.
Analysis of the medium-capacity system (Brown line)
In this study, a total of 183 valid records were compiled for the medium-capacity system (Brown line). Statistical analysis and association rule mining were conducted based on the defined input attributes. The relevant statistical results are presented in Table 10.
In the final stage of analysis, the minimum support threshold was set at 1.5%, the minimum confidence threshold at 10%, and only association rules with a lift greater than 1 were retained for further analysis. These three criteria were applied simultaneously to ensure the reliability and practical relevance of the extracted rules.
To enhance the readability and interpretability of the results, a color-coding scheme was applied based on the range of lift values:
(i)
Rules with a lift between 1.0 and 1.5 are highlighted in light blue.
(ii)
Those between 1.5 and 2.0 are in blue.
(iii)
Rules with a lift greater than 2.0 in dark blue.
After filtering, a total of 24 association rules met the specified conditions. The detailed results are presented in Table 11.
This study applied association rule mining to investigate and summarize the causes of system faults in the medium-capacity system (Brown line). For each fault category, the corresponding association rules were computed and analyzed using three core indicators: Support, confidence, and lift.
After obtaining the preliminary analytical results, the study further cross-validated the findings by referencing actual maintenance records, relevant literature, and recent incident reports. Through the conditional combinations revealed by association rules, the potential correlations and contextual backgrounds were explored in depth.
Based on the results, a set of multi-faceted recommendations was proposed to assist the metro authority in optimizing maintenance routines, equipment inspections, and preventive mechanisms. Due to the large volume of data processed, only the most highly correlated and explanatorily significant rules are presented here.
Table 12 provides a summary of the qualified association rules identified for the Brown Line system. Each conditional combination is listed alongside its respective values for support, confidence, and lift, serving as a practical reference for future operational planning and decision-making.
Recommendations for improvement of the medium-capacity system (Brown line).
(i)
Power system
This study identified that although the types of power system faults are diverse, failures tend to cluster between 06:00 and 12:00 on both sunny and rainy days. These time-weather combinations meet the minimum support (1.5%) and confidence (10%) thresholds, with particularly high lift values—3.6 and 4.0, respectively—under winter and sunny morning conditions. This suggests that failures in the power system are more likely to occur during the early morning start-up phase, potentially due to reduced system stability during cold starts.
Therefore, it is recommended that the Taipei Metro strengthens inspections and maintenance of power systems prior to morning train dispatch. Maintenance records should be thoroughly analyzed, with a focus on components that require frequent replacement, to appropriately shorten inspection intervals. Specifically, the following two measures are proposed for the propulsion power substation (PPSS):
Rapid fault response: When an abnormality is detected in the PPSS, a fault-handling procedure should be initiated immediately, aiming to restore service quickly, with backup systems in place to maintain short-term transport capacity.
Institutionalized regular inspections: Regularly assess the condition of PPSS components, replacing outdated or fragile parts in advance to improve overall system stability, reduce maintenance costs, and minimize risk of service interruptions.
(ii)
Signal faults
Signal faults in the medium-capacity system most frequently occur under sunny conditions between 06:00 and 12:00. As this system operates autonomously without drivers, many maintenance reports have linked these faults to limited system stability. It is hypothesized that such issues may result from initialization errors during early morning start-up or decreased operator attentiveness during the early hours. To mitigate these problems, it is recommended that the Taipei Metro (i) enhances the start-up stability of the autonomous system and (ii) provides targeted training and reinforces operational protocols for early-shift personnel.
(iii)
External factors
Data indicate a strong association between external factors and the 18:00–24:00 period in autumn. Further investigation revealed that many incidents were caused by passengers accidentally activating emergency handles inside train cars—categorized as uncontrollable events (only one was deemed controllable). Given that the Brown line operates on an unmanned system, this study proposes increasing the frequency of track inspections—especially during high-risk periods—and installing real-time video surveillance in vulnerable areas, and redesigning emergency handles with a multi-step triggering mechanism to reduce the risk of accidental activation and enhance the fault-tolerance of the system.
(iv)
Communication failures
Communication failures were primarily observed between 18:00 and 24:00 on sunny days during the summer, with significantly high lift values. Analysis reveals that switch malfunctions accounted for approximately 45% of these cases, likely due to high summer temperatures and peak evening passenger loads. It is recommended that the Taipei Metro evaluates the thermal tolerance of communication switches and upgrades components, or considers alternative suppliers if necessary. Additionally, maintenance frequency of the communication system should be increased before and during summer peak periods to facilitate preventive maintenance and reduce the likelihood of failures.
(v)
Electric multiple unit (EMU) failures
EMU-related failures represent the most prevalent fault type in the medium-capacity system. This study analyzed seven representative conditional combinations associated with such failures (as detailed in Table 12): Sunny and 06:00–12:00, Rainy and 12:00–18:00, Sunny and Summer, Sunny and Autumn, Summer and 06:00–12:00, Autumn and 06:00–12:00, and Sunny and 06:00–12:00 and Summer.
Four key observations and recommendations were derived, as follows:
  • Sunny and 06:00–12:00 and Summer (with the highest lift value at 1.416)
The primary causes were identified as cable degradation and defective solder joints, jointly responsible for over 50% of incidents. These issues are likely caused by heat-induced insulation degradation and terminal desoldering. It is advised that preventive maintenance of electrical systems be strengthened during summer, particularly through prioritized inspections prior to morning dispatch.
  • Rainy and 12:00–18:00
Data show that 54.54% of faults during this time were brake system-related. The wet environment in rainy weather likely increased braking system load, causing malfunctions to emerge in the early afternoon. Enhanced inspection and testing protocols for brake systems during rainy periods are recommended to ensure stable braking performance.
  • Summer and 06:00–12:00
The predominant failure types were obstacle detection errors, signal anomalies, and cable damage, together comprising 75% of reported incidents. This highlights the substantial impact of summer morning weather conditions on EMU stability. Recommendations include upgrading cable insulation materials, improving the heat resistance of signal systems, and shortening pre-inspection intervals for related components.
  • Conditions associated with the 06:00–12:00 period (e.g., Sunny, Rainy, Summer, Autumn)
The data indicate that the early morning period is a high-risk window for system faults. Although individual support and confidence metrics may not all meet significance thresholds, this time frame should be regarded as a critical risk period. The Taipei Metro is advised to prioritize system checks before morning departures to enhance the operational stability and safety of EMUs during the early stages of service.
B.
Analysis of the high-capacity system
Due to the incomplete weather records in the high-capacity system dataset—where more than half of the entries lacked specific weather information—this study excluded weather as a factor in the analysis. Instead, the research focused on season and time of day as the primary input attributes. After data filtering, a total of 978 valid records were obtained. The statistical summary based on the selected input attributes is presented in Table 13.
In this study, for the high-capacity system dataset, the minimum support was set at 1.5%, the minimum confidence at 7%, and the lift value was required to be greater than 1. Only association rules that simultaneously satisfied all three criteria were retained as results with substantial analytical value.
To enhance visual identification and facilitate data comparison, color coding was applied based on the range of lift values: rules with lift values between 1 and 1.5 were marked in light blue, those between 1.5 and 2.0 in blue, and those greater than 2.0 in dark blue. After filtering, a total of 23 association rules met the criteria. The summarized results are presented in Table 14.
This study employed association rule mining to analyze and summarize the causes of system failures in high-capacity metro systems. For each failure type, the associated rule calculations were compiled, including three key indicators: support, confidence, and lift.
After obtaining the preliminary analysis results, further validation and categorization were conducted by cross-referencing actual maintenance records, relevant literature, and recent incidents. The rule-based attribute combinations revealed by the analysis were examined to explore their underlying correlations and contextual background.
Based on the findings, this study proposes a series of improvement strategies from multiple perspectives to assist the metro company in optimizing maintenance, equipment inspection, and preventive mechanisms. Due to the large volume of computed data, only a selection of highly relevant and interpretable results is presented. Table 15 summarizes the qualifying association rule outcomes for the high-capacity system, detailing the support, confidence, and lift values for each condition combination as a reference for future operational planning and decision-making.
Recommendations for improvement of the high-capacity system.
(i)
Signal system failures
According to the data analysis, signal system failures were predominantly concentrated in the 06:00–12:00 time period during spring and winter. The association rules during these periods met the minimum support and confidence thresholds set by this study, as detailed in Table 15. The analysis revealed multiple causes, including signal anomalies, automatic train protection (ATP) system malfunctions, and poor circuit board connections—suggesting the faults are not attributable to a single factor.
Therefore, it is recommended that the Taipei Metro enhances the overall stability of the signal system, particularly by reinforcing inspection protocols for relevant equipment during spring and winter mornings. Additionally, a regular maintenance and inspection plan should be established, with preventive measures scheduled for high-risk periods to mitigate operational disruptions.
(ii)
Track failures
Track failures showed significant association only in the 06:00–12:00 period on the Red line, with the relevant rule listed in Table 15. Maintenance records indicate that 57% of the incidents were due to misaligned switch points. Other issues included aging components, mechanical malfunctions, or unidentified causes.
It is recommended that the Taipei Metro strengthens functionality tests and maintenance routines for switch points prior to the morning dispatch on the Red line. The inspection frequency should be shortened, and additional personnel should be assigned during high-risk periods for real-time support. It is also advisable to consider the preemptive replacement of problematic equipment or provide technical feedback to suppliers for performance improvement.
(iii)
External factors
Although the conditions associated with external factors met the basic association thresholds, the overall lift values were not significant. Data showed that 65% of controllable events were due to human error, primarily driver mistakes such as failure to properly close the cab door or incorrect station stopping. Unlike the medium-capacity system, where incidents were mostly passenger-induced, human errors in the high-capacity system were mainly caused by drivers. However, due to the absence of driver identification in the dataset, further verification of specific individuals or shifts was not possible.
It is recommended that the Taipei Metro enhances driver training, emphasizing operational protocols and accident simulation drills. A regular performance evaluation system should be implemented. From a hardware perspective, the human–machine interface design should be improved to reduce the likelihood of operational errors.
  • (iv) EMU failures
Electric multiple unit (EMU) failures were the most frequent anomaly in the high-capacity system. The Red line during the 12:00–18:00 period in spring and summer showed the highest lift values, as detailed in Table 14. Subsystem analysis of failures revealed that on-board systems accounted for 21.14%, door systems 18.80%, brake systems 16.19%, propulsion systems 8.61%, auxiliary power systems 6.27%, and control systems only 1.83%. Further analysis identified the following main causes:
  • Door system: Many failures were triggered by emergency stops due to improperly closed cab doors.
  • On-board signaling system: Failures were often linked to automatic train operation (ATO) module instability, including system crashes, loose connections, and logic errors.
  • Brake system: The causes varied; one case involved brake pressure failing to release, though maintenance logs did not specify the technical reasons.
  • Drawing upon these findings, the study proposes the following improvement measures:
  • Door System: It is recommended to install cab door closure indicators and strengthen driver training on door operation procedures. In addition, targeted retraining for personnel with frequent operational errors can help reduce the risk of incidents caused by human error.
  • On-board signaling system: Conduct systematic testing and upgrades of the ATO modules, and consider adopting more stable alternatives to prevent cascading failures across subsystems.
  • Brake system: Enhance preventive maintenance of electronic control units and require detailed failure documentation by technicians to support future analysis and system improvements.
Additionally, because failures are concentrated during high-temperature, high-load periods—particularly on spring and summer afternoons—it is recommended that the Taipei Metro assigns dedicated personnel for inspections and emergency response during these times to ensure operational safety and minimize the impact of unexpected incidents. Furthermore, the analytical framework and classification logic developed in this study are generalizable and may be applied to urban transit systems in other cities, especially those with similar incident categories and reporting mechanisms.

4. Conclusions

This study integrates supervised machine learning and association rule mining techniques to perform a comprehensive big data analysis of passenger injury incidents and train failure events within the Taipei Metro system. It proposes concrete and actionable optimization strategies, demonstrating both high novelty and practical contribution.
In the first part, the study innovatively applies a decision tree model to analyze 3,331 cases of passenger injuries. Through data preprocessing, oversampling, and feature engineering techniques, two highly discriminative rules were extracted, as follows. (i) Elderly passengers over the age of 61 are more likely to suffer moderate to severe injuries when involved in incidents within stations. (ii) Passengers aged 61 or below are more prone to serious injuries when using escalators during off-peak hours. These findings are among the first to quantitatively reveal the interaction between age and usage time in influencing injury severity. This fills a gap left by previous studies that primarily relied on surveys or descriptive statistics, and provides a new perspective for risk prediction and passenger service design.
The second part of the research focuses on exploring the causes of train failures. From 1157 records of operational delays exceeding five minutes, the study employs association rule analysis to uncover statistically significant conditional combinations related to failures, considering variables such as time period, season, metro line, and weather. The results not only identify the correlation between different subsystems (e.g., power supply, communication, and rolling stock) and their high-risk spatiotemporal patterns but are also cross-validated with maintenance records. This allowed for the classification of failure types (e.g., brake anomalies, door malfunctions, and switch-point failures) and the identification of predictive conditions. Notably, this research marks a pioneering application of association rule mining in metro maintenance decision-making, enabling a data-driven, proactive maintenance approach and providing a practical model for smart metro system management.
Moreover, this study reveals inconsistencies and missing data in the current maintenance record-keeping practices. It recommends enhancing documentation protocols and post-entry validation to improve data integrity and the accuracy of subsequent analyses. Regarding the threshold settings in association rule mining (such as minimum support and confidence), the study highlights their critical influence on rule discovery coverage. It thus recommends that future practical applications incorporate expert judgment and system-specific requirements to dynamically adjust parameter thresholds and uncover more insightful patterns.
In summary, this study demonstrates a cross-disciplinary integration by systematically applying machine learning and association rule techniques to metro incident analysis in Taiwan. It proposes a quantifiable and practically feasible risk identification and prevention framework. The approach not only enhances the safety and reliability of the metro system but also serves as a transferable reference model for risk assessment and maintenance optimization in other urban rail transit systems, with significant scalability and application potential.
Future research could extend this framework to other urban transit systems and incorporate real-time data streaming for dynamic risk prediction. Additionally, future studies may consider integrating passenger service quality and outsourced service outcomes into the analytical framework, with a focus on performance-based contract management. To enhance operational oversight, performance evaluation indicators should be thoroughly documented and systematically monitored. It is recommended to establish a periodic tracking and cross-verification mechanism—short-term (every 3 years), mid-term (every 5 years), and long-term (every 10 years)—to support regular performance reviews and enable data-driven adjustments based on cumulative records. In addition, it is important to consider regional differences. Metro systems may vary significantly in terms of passenger composition, infrastructure, outsourcing models, and managerial strategies. Therefore, prior to applying this framework in other contexts, localized data training and model adaptation would be essential. We also recommend extending this framework to metro systems in other major Asian cities—such as Tokyo, Seoul, and Singapore—to validate the applicability and robustness of the proposed risk prediction and classification mechanism across diverse urban environments.

Author Contributions

Conceptualization, S.-N.P. and C.-Y.H.; formal analysis, S.-N.P. and C.-Y.H.; investigation, S.-N.P. and C.-Y.H.; software, S.-N.P. and C.-Y.H.; methodology, S.-N.P. and C.-Y.H.; data curation, S.-N.P. and C.-Y.H.; visualization: S.-N.P. and C.-Y.H.; funding acquisition, H.-D.L.; supervision, H.-D.L.; writing– original draft, S.-N.P., C.-Y.H., H.-D.L. and P.-J.L.; writing–review and editing, S.-N.P., C.-Y.H., H.-D.L. and P.-J.L. All authors have read and agreed to the published version of the manuscript.

Funding

This research is funded by the National Science and Technology Council, Taiwan, grant number NSTC 113-2221-E-003-017.

Data Availability Statement

Data are contained within the article.

Conflicts of Interest

The authors declare no conflicts of interest.

Appendix A

A.
Python
Python is a high-level programming language widely adopted across various domains due to its clean syntax, gentle learning curve, and extensive library support [29,30]. It is particularly well-suited for beginners entering the field of programming. Designed with an emphasis on readability and development efficiency, Python has become a key tool in numerous technical areas, including scientific computing, data analysis, web scraping, machine learning, and artificial intelligence.
In addition, Python features strong interoperability with other programming languages such as C, C++, and Java, allowing seamless module integration for applications that require cross-language support or system-level integration.
Python also benefits from a diverse ecosystem of development tools. Popular environments such as PyCharm 2023, Visual Studio Code 1.79, and Jupyter Notebook 7.0 offer intuitive interfaces and rich plug-in support, significantly enhancing development productivity and debugging efficiency.
B.
Visual Studio Code
Visual Studio Code (commonly known as vs. Code) is a free, cross-platform source code editor developed by Microsoft. It supports Windows, Linux, and macOS operating systems and is available as open-source software [31]. Visual Studio Code offers a range of features designed to boost developer productivity and enhance the user experience, including real-time syntax suggestions (similar to IntelliSense), code completion, snippets, refactoring tools, debugging capabilities, and built-in Git version control.
Moreover, Visual Studio Code supports extensive customization. Users can personalize themes, keyboard shortcuts, layout configurations, and more, to suit their preferences. Through the integrated Extension Marketplace, developers can easily install a variety of plug-ins to support different programming languages and development workflows, making Visual Studio Code one of the most popular lightweight integrated development environments (IDEs) in use today.
C.
Scikit-learn
Scikit-learn is a powerful machine learning library for Python [32], offering a consistent and user-friendly interface that supports a wide range of common machine learning tasks, including classification, regression, clustering, and dimensionality reduction. Built on top of core scientific computing libraries such as NumPy, SciPy, and Matplotlib 3.7, Scikit-Learn is designed to provide developers and researchers with efficient, reliable, and easy-to-use machine learning tools.
The library includes a comprehensive suite of modules for model construction, training, and evaluation. In particular, it offers full implementations of decision tree models, supporting hyperparameter tuning, model interpretation, and performance evaluation—allowing for flexible applications and in-depth analysis.

References

  1. Tseng, C.-C.; Lee, S.-L. Influential Station Identification of Taipei Metro Network Based on Laplacian Centrality. In Proceedings of the 2023 International Conference on Consumer Electronics—Taiwan (ICCE-Taiwan), PingTung, Taiwan, 2–4 August 2023; pp. 737–738. [Google Scholar] [CrossRef]
  2. Tseng, C.-C.; Lee, S.-L. Computing Graph Fourier Transform Centrality with Graph Filter Designed by Hermite Polynomial. In Proceedings of the 2024 International Conference on Consumer Electronics—Taiwan (ICCE-Taiwan), Taichung, Taiwan, 12–14 June 2024; pp. 653–654. [Google Scholar] [CrossRef]
  3. Cheng, J. The Determinants of Commercial Land Leases in the Non-Central Districts of a Large City in China: Data Analysis from the Government–Market Perspective. Mathematics 2025, 13, 1595. [Google Scholar] [CrossRef]
  4. Liu, J.; He, Q.; Yue, Z.; Pei, Y. A Hybrid Strategy-Improved SSA-CNN-LSTM Model for Metro Passenger Flow Forecasting. Mathematics 2024, 12, 3929. [Google Scholar] [CrossRef]
  5. Pei, Y.; Xie, F.; Wang, Z.; Dong, C. Resilience Measurement of Bus–Subway Network Based on Generalized Cost. Mathematics 2024, 12, 2191. [Google Scholar] [CrossRef]
  6. Zhang, J.; Chen, Y.; Zhang, S.; Zhang, Y. SAD-ARGRU: A Metro Passenger Flow Prediction Model for Graph Residual Gated Recurrent Networks. Mathematics 2024, 12, 1175. [Google Scholar] [CrossRef]
  7. Taiwan News. Taroko Accident Data. 2025. Available online: https://www.taiwannews.com.tw/news/4987180 (accessed on 20 June 2025).
  8. El Zein, Y.; Lemay, M.; Huguenin, K. PrivaTree: Collaborative Privacy-Preserving Training of Decision Trees on Biomedical Data. IEEE/ACM Trans. Comput. Biol. Bioinform. 2024, 21, 1–13. [Google Scholar] [CrossRef] [PubMed]
  9. Liu, P.; Chen, Z.; Liu, M.; Piao, C.; Wan, K.; Huang, H. Vertical Parking Trajectory Planning with the Combination of Numerical Optimization Method and Gradient Lifting Decision Tree. IEEE Trans. Consum. Electron. 2024, 70, 1845–1856. [Google Scholar] [CrossRef]
  10. Zhang, D.; Xu, Y.; Peng, Y.; Du, C.; Wang, N.; Tang, M.; Lu, L.; Liu, J. An Interpretable Station Delay Prediction Model Based on Graph Community Neural Network and Time-Series Fuzzy Decision Tree. IEEE Trans. Fuzzy Syst. 2023, 31, 421–433. [Google Scholar] [CrossRef]
  11. Gugliermo, S.; Schaffernicht, E.; Koniaris, C.; Pecora, F. Learning Behavior Trees from Planning Experts Using Decision Tree and Logic Factorization. IEEE Robot. Autom. Lett. 2023, 8, 3534–3541. [Google Scholar] [CrossRef]
  12. Siswanto, B.; Soeparno, H.; Sianipar, N.F.; Budiharto, W. SDFP-Growth Algorithm as a Novelty of Association Rule Mining Optimization. IEEE Access 2024, 12, 21491–21502. [Google Scholar] [CrossRef]
  13. Darwish, S.M.; Essa, R.M.; Osman, M.A.; Ismail, A.A. Privacy Preserving Data Mining Framework for Negative Association Rules: An Application to Healthcare Informatics. IEEE Access 2022, 10, 76268–76280. [Google Scholar] [CrossRef]
  14. Yu, C.-H. Experimental Implementation of Quantum Algorithm for Association Rules Mining. IEEE J. Emerg. Sel. Top. Circuits Syst. 2022, 12, 676–684. [Google Scholar] [CrossRef]
  15. Sinha Roy, T.; Roy, J.K.; Mandal, N. Conv-Random Forest-Based IoT: A Deep Learning Model Based on CNN and Random Forest for Classification and Analysis of Valvular Heart Diseases. IEEE Open J. Instrum. Meas. 2023, 2, 2500717. [Google Scholar] [CrossRef]
  16. Zheng, Y.; Xu, S.; Wang, S.; Gao, Y.; Hua, Z. Privet: A Privacy-Preserving Vertical Federated Learning Service for Gradient Boosted Decision Tables. IEEE Trans. Serv. Comput. 2023, 16, 3604–3620. [Google Scholar] [CrossRef]
  17. Lee, J.; Sim, M.K.; Hong, J.-S. Assessing Decision Tree Stability: A Comprehensive Method for Generating a Stable Decision Tree. IEEE Access 2024, 12, 90061–90072. [Google Scholar] [CrossRef]
  18. Mienye, I.D.; Jere, N. A Survey of Decision Trees: Concepts, Algorithms, and Applications. IEEE Access 2024, 12, 86716–86727. [Google Scholar] [CrossRef]
  19. Cheng, Y.; Guo, Y.; Xiu, C.; Li, Y. Multi-Feature Fusion Sea Surface Floating Small Target Detection Based on Bagging Decision Tree. IEICE Trans. Commun. 2025, E108-B, 681–692. [Google Scholar] [CrossRef]
  20. Hassan, A.M.; Amee, A.H.; Hossain, M.I.; Khan, S.F.; Farid, D.M. A Novel Pessimistic Decision Tree Pruning Approach for Classification. In Proceedings of the 2023 6th International Conference on Electrical Information and Communication Technology (EICT), Khulna, Bangladesh, 21–23 December 2023; pp. 1–6. [Google Scholar] [CrossRef]
  21. Lee, J.; Apriliyandi, K.; Gunawan, E.; Honova, S.M.; Salim, B.V.; Anggreainy, M.S.; Parmonangan, I.H. Comparative Analysis of Neural Network Method on Stroke Prediction. In Proceedings of the 2023 10th International Conference on ICT for Smart Society (ICISS), Bandung, Indonesia, 27–28 September 2023; pp. 1–6. [Google Scholar] [CrossRef]
  22. Chandra, A.; Chakraborty, R.; Nandi, S.; Porel, B. Novel Method for Detection of Alzheimer’s Disease Using Gini Impurity Based Decision Tree Model. In Proceedings of the 2023 10th International Conference on Signal Processing and Integrated Networks (SPIN), Noida, India, 23–24 February 2023; pp. 142–147. [Google Scholar] [CrossRef]
  23. Liu, Y.; Deng, A.; Deng, M.; Shi, Y.; Zhou, Z.; Hu, Q. A Fuzzy Confusion Matrix-Based Self-Supervised Learning Method to Mitigate Class Confusion for Partial Transfer Fault Diagnosis. IEEE Trans. Instrum. Meas. 2024, 73, 3535412. [Google Scholar] [CrossRef]
  24. Erbani, J.; Portier, P.-É.; Egyed-Zsigmond, E.; Nurbakova, D. Confusion Matrices: A Unified Theory. IEEE Access 2024, 12, 181372–181419. [Google Scholar] [CrossRef]
  25. Jin, Y.; Cao, Z.; Wang, X.; Wang, J.; Long, M. One Fits Many: Class Confusion Loss for Versatile Domain Adaptation. IEEE Trans. Pattern Anal. Mach. Intell. 2024, 46, 7251–7266. [Google Scholar] [CrossRef]
  26. Liu, L.; Su, J.; Liu, X.; Chen, R.; Huang, X.; Kou, G.; Fu, S. Towards Strong Privacy Protection for Association Rule Mining and Query in the Cloud. IEEE Trans. Cloud Comput. 2023, 11, 3211–3225. [Google Scholar] [CrossRef]
  27. Mohanty, B.; Champati, S.L.; Barisal, S.K. Enhancing Retail Strategies through Anomaly Detection in Association Rule Mining. IEEE Access 2025, 13, 92376–92405. [Google Scholar] [CrossRef]
  28. Bhatt, P.C.; Hsu, Y.-C.; Lai, K.-K.; Drave, V.A. Technology Convergence Assessment by an Integrated Approach of BERT Topic Modeling and Association Rule Mining. IEEE Trans. Eng. Manag. 2025, 72, 1699–1713. [Google Scholar] [CrossRef]
  29. Alimisis, V.; Arnaoutoglou, D.G.; Serlis, E.A.; Kamperi, A.; Metaxas, K.; Kyriacou, G.A.; Sotiriadis, P.P. A Radar-Based System for Detection of Human Fall Utilizing Analog Hardware Architectures of Decision Tree Model. IEEE Open J. Circuits Syst. 2024, 5, 224–242. [Google Scholar] [CrossRef]
  30. Sanjana, K.; Babu, M.S.; Sarathi, R.; Chillu, N. Classification of Polluted Silicone Rubber Insulators by Using LIBS Assisted Machine Learning Techniques. IEEE Access 2023, 11, 1752–1760. [Google Scholar] [CrossRef]
  31. Ali, A.; Irfan, A.; Raza, A.; Memon, Z. Banking in the Digital Age: Predicting Eligible Customers through Machine Learning and AWS. In Proceedings of the 2024 IEEE 1st Karachi Section Humanitarian Technology Conference (KHI-HTC), Tandojam, Pakistan, 9–10 February 2024; pp. 1–6. [Google Scholar] [CrossRef]
  32. Alves de Abreu, B.; Paim, G.; Alrahis, L.; Flores, P.; Sinanoglu, O.; Bampi, S.; Amrouch, H. On the Efficacy and Vulnerabilities of Logic Locking in Tree-Based Machine Learning. IEEE Trans. Circuits Syst. I Regul. Pap. 2025, 72, 180–191. [Google Scholar] [CrossRef]
Figure 1. Flowchart of decision tree analysis.
Figure 1. Flowchart of decision tree analysis.
Mathematics 13 02470 g001
Figure 2. Flowchart of association rule analysis.
Figure 2. Flowchart of association rule analysis.
Mathematics 13 02470 g002
Figure 3. Visualization of the decision tree model.
Figure 3. Visualization of the decision tree model.
Mathematics 13 02470 g003
Figure 4. Visualization of the pruned decision tree model.
Figure 4. Visualization of the pruned decision tree model.
Mathematics 13 02470 g004
Table 1. Comparison of decision tree, random forest, and gradient boosting algorithms.
Table 1. Comparison of decision tree, random forest, and gradient boosting algorithms.
Feature/ModelDecision TreeRandom ForestGradient Boosting
Basic PrincipleUses a single decision tree for classification or regressionConstructs multiple trees and aggregates their outputs via averaging or votingBuilds trees sequentially, correcting errors of previous models
Model StructureSingle model with high interpretabilityEnsemble of multiple models, reducing overfittingSequential ensemble model, continuously optimizing residuals
InterpretabilityHigh: easy to visualize and understandLow: complex structure, difficult to interpretVery low: difficult to trace individual decision paths
Training TimeFastLongerLongest, especially with large datasets
Table 2. Confusion matrix.
Table 2. Confusion matrix.
Actual PositiveActual Negative
Predicted positiveTP (True positive)FP (False positive, Type I error)
Predicted negativeFN (False negative, Type II error)TN (True negative)
Table 3. Feature variables (X) for passenger injury data in the metro system.
Table 3. Feature variables (X) for passenger injury data in the metro system.
Feature Variables (X)CategoryDescription
Period of timePeakWeekdays 07:00–09:00 and 17:00–19:30
Off-peakNon-peak weekday hours
WeekendSaturdays and Sundays
AgeContinuous variable
LocationPlatformIncludes platform, platform doors, and track area
TrainInside the train car
FloorStation concourse or passageway floor
ToiletRestroom areas
EscalatorEscalator zones
StairsStairways
ElevatorElevators
Out-of-stationAreas outside the station premises
OtherOther unspecified areas
Type of IncidentPinchIncluding pinching or being caught in a gap
SprainJoint sprain or strain
Insect biteBites from insects or mosquitoes
CrowdingIncludes pushing, collision, or compression
CrushBeing struck by a falling object
AttackedIncludes physical assault, biting, or stabbing
FallSlips or falls
Electric shockContact with electrical sources
Step onStepping-related injuries
ScrapeIncludes abrasions, cuts, or bruises
DiscomfortPhysical discomfort or illness
OtherOther unspecified causes
UnknownCause cannot be determined
SexMale
Female
Table 4. Target variable (Y) for passenger injury data in the metro system.
Table 4. Target variable (Y) for passenger injury data in the metro system.
Degree of InjuryDescription
MildIncludes abrasions, swelling, or no visible injury
ModerateIncludes fractures or dislocations; also applies to individuals aged 60+ who were transported by ambulance
SevereIncludes major bleeding, unconsciousness, or similar conditions
Table 5. Feature importance of variables in the decision tree model.
Table 5. Feature importance of variables in the decision tree model.
Feature VariableFeature Importance
Age0.6506
Location_Escalator0.0335
Sex_Male0.0330
Location_Platform0.0262
Time_Off-Peak0.0259
Location_Stairs0.0257
Location_Floor0.0254
Sex_Female0.0252
Location_Train0.0244
Incident_Fall0.0241
Time_Peak0.0194
Incident_Pinch0.0156
Time_Weekend0.0102
Incident_Crowding0.0100
Location_Toilet0.0091
Location_Out-of-Station0.0076
Incident_Scrape0.0067
Location_Elevator0.0056
Incident_Sprain0.0041
Location_Other0.0040
Incident_Insect_Bite0.0031
Incident_Crush0.0029
Incident_Unknown0.0023
Incident_Other0.0021
Incident_Attacked0.0020
Incident_Step_On0.0011
Incident_Discomfort0.0000
Incident_Electric_Shock0.0000
Table 6. Sample distribution by injury severity (Target variable).
Table 6. Sample distribution by injury severity (Target variable).
Injury Severity CategoryNumber of Samples
Mild injury2188
Moderate injury1058
Severe injury85
Table 7. Sample distribution by injury severity after oversampling (Target variable).
Table 7. Sample distribution by injury severity after oversampling (Target variable).
Injury Severity CategoryNumber of Samples
Mild Injury2188
Moderate injury2188
Severe injury2188
Table 8. Confusion matrix of the decision tree model.
Table 8. Confusion matrix of the decision tree model.
Predicted\ActualMild InjuryModerate InjurySevere Injury
Mild injury3267536
Moderate injury6231264
Severe injury00438
Table 9. Precision and recall by injury severity category.
Table 9. Precision and recall by injury severity category.
Injury Severity CategoryPrecisionRecall
Mild injury71%81%
Moderate injury75%84%
Severe injury100%81%
Table 10. Statistical summary of input attributes for the medium-capacity system (Brown line).
Table 10. Statistical summary of input attributes for the medium-capacity system (Brown line).
AttributeCategoryFrequency
SeasonSpring (Mar.–May)35
Summer (Jun.–Aug.)71
Autumn (Sep.–Nov.)42
Winter (Dec.–Feb.)35
Subtotal183
Time of day00:00–06:007
06:00–12:0077
12:00–18:0060
18:00–24:0039
WeatherSunny113
Cloudy19
Rainy51
Main system typePower system fault8
Signal fault12
Track fault11
External factors39
Communication fault9
EMU fault104
Table 11. Association rule results for the medium-capacity system (Brown line). (Target attribute: six fault categories).
Table 11. Association rule results for the medium-capacity system (Brown line). (Target attribute: six fault categories).
Attribute CombinationPower System (1)Signal Fault (2)Track Fault (3)External Factor (4)Communication Fault (5)EMU Fault (6)
Sunny and 06:00–12:001.101.53 1.09
Sunny and 12:00–18:00 1.181.33
Sunny and 18:00–24:00 3.27
Rainy and 06:00–12:002.57
Rainy and 12:00–18:00 1.36
Rainy and 18:00–24:00 1.38
Sunny and Summer 1.541.11
Sunny and Autumn 1.18
Sunny and Winter4.00 1.21
Rainy and Summer 2.73
Rainy and Autumn 2.48
Summer and 06:00–12:00 1.33
Summer and 12:00–18:00 2.05
Summer and 18:00–24:00 2.89
Autumn and 06:00–12:00 1.18
Autumn and 18:00–24:00 3.12
Winter and 06:00–12:003.60
Sunny and 06:00–12:00 and Summer 1.42
Sunny and 12:00–18:00 and Summer 1.93
Table 12. Association rule mining results for the medium-capacity system (Brown line): Support, confidence, and lift.
Table 12. Association rule mining results for the medium-capacity system (Brown line): Support, confidence, and lift.
System TypeSpecial Attribute CombinationSupportConfidenceLift
Power systemSunny and 06:00–12:000.0170.3001.102
Rainy and 06:00–12:000.0170.3002.571
Sunny and Winter0.0220.4004.000
Winter and 06:00–12:000.0170.3003.600
Signal faultSunny and 06:00–12:000.0280.4171.531
External factorsAutumn and 18:00–24:000.0220.1213.116
Communication faultSunny and 12:00–18:000.0170.2721.327
Sunny and 18:00–24:000.2220.3643.272
Sunny and Summer0.0280.4551.543
Summer and 18:00–24:000.1670.2722.887
EMU faultSunny and 06:00–12:000.1720.2981.094
Rainy and 12:00–18:000.0610.1061.359
Sunny and Summer0.1890.3271.111
Sunny and Autumn0.0720.1251.184
Summer and 06:00–12:000.1110.1921.331
Autumn and 06:00–12:000.0830.1441.183
Sunny and 06:00–12:00 and Summer0.1000.1731.416
Table 13. Statistical summary of input attributes for the high-capacity system.
Table 13. Statistical summary of input attributes for the high-capacity system.
Attribute CategoryClassificationFrequency
SeasonSpring (Mar.–May)249
Summer (Jun.–Aug.)250
Autumn (Sep.–Nov.)250
Winter (Dec.–Feb.)229
Subtotal978
Time of day00:00–06:0048
06:00–12:00371
12:00–18:00315
18:00–24:00237
System categoryPower system failure46
Signal system failure120
Track system failure65
External factors329
Communication failure35
Electric multiple unit (EMU) Failure383
Table 14. Association rule statistics for the high-capacity system (Target attribute: Six types of system failures).
Table 14. Association rule statistics for the high-capacity system (Target attribute: Six types of system failures).
Special Attribute CombinationsPower System (1)Signal Failure (2)Track Failure (3)External Factors (4)Communication Failure (5)EMU Failure (6)
Blue line and 12:00–18:00 1.54
Red line and 06:00–12:00 1.36 1.08
Red line and 12:00–18:00 1.23
Red line and 18:00–24:00 1.10
Blue line and Autumn 1.37
Red line and Spring 1.12 1.27
Red line and Summer 1.22
Spring and 06:00–12:00 1.57 1.11
Spring and 12:00–18:00 1.26
Spring and 18:00–24:00 1.01
Summer and 06:00–12:00 1.12 1.06
Summer and 12:00–18:00 1.28
Summer and 18:00–24:00 1.59
Autumn and 12:00–18:00 1.39
Winter & 06:00–12:00 1.44 1.02
Winter and 12:00–18:00 1.21
Red line and 12:00–18:00 and Spring 1.46
Red line and 12:00–18:00 and Summer 1.49
Table 15. Association rule computation results for the high-capacity system (Support, confidence, and lift values).
Table 15. Association rule computation results for the high-capacity system (Support, confidence, and lift values).
System TypeAttribute CombinationSupportConfidenceLift
Signal system failureRed line and Spring0.0210.1751.119
Spring adn 06:00–12:000.0160.1331.571
Winter and 06:00–12:000.0150.1251.438
Track failureRed line and 06:00–12:000.0190.2921.361
External factorsBlue line and 12:00–18:000.0290.0881.539
Blue line and Autumn0.0250.0731.372
Summer and 06:00–12:000.0390.1161.118
Summer and 18:00–24:000.0330.0971.585
Autumn and 12:00–18:000.0380.1121.392
Winter and 12:00–18:000.0330.1001.211
EMU failureRed line and 12:00–18:00 and Spring0.0330.0841.459
Red line and 12:00–18:00 and Summer0.0270.0731.489
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Peng, S.-N.; Huang, C.-Y.; Liu, H.-D.; Lin, P.-J. An Analysis of Hybrid Management Strategies for Addressing Passenger Injuries and Equipment Failures in the Taipei Metro System: Enhancing Operational Quality and Resilience. Mathematics 2025, 13, 2470. https://doi.org/10.3390/math13152470

AMA Style

Peng S-N, Huang C-Y, Liu H-D, Lin P-J. An Analysis of Hybrid Management Strategies for Addressing Passenger Injuries and Equipment Failures in the Taipei Metro System: Enhancing Operational Quality and Resilience. Mathematics. 2025; 13(15):2470. https://doi.org/10.3390/math13152470

Chicago/Turabian Style

Peng, Sung-Neng, Chien-Yi Huang, Hwa-Dong Liu, and Ping-Jui Lin. 2025. "An Analysis of Hybrid Management Strategies for Addressing Passenger Injuries and Equipment Failures in the Taipei Metro System: Enhancing Operational Quality and Resilience" Mathematics 13, no. 15: 2470. https://doi.org/10.3390/math13152470

APA Style

Peng, S.-N., Huang, C.-Y., Liu, H.-D., & Lin, P.-J. (2025). An Analysis of Hybrid Management Strategies for Addressing Passenger Injuries and Equipment Failures in the Taipei Metro System: Enhancing Operational Quality and Resilience. Mathematics, 13(15), 2470. https://doi.org/10.3390/math13152470

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop