Development of machine learning models for walking-based classification of incomplete spinal cord injury and Cauda equina syndrome.

Machine Learning


Data collection

This study used gait data collected at Chungnam National University Hospital from 2013 to 2021 from patients diagnosed with various neurological conditions. All data was obtained using a 3D motion capture system (Vicon Motion Systems, Ltd., Oxford, UK). All data were recorded using the Vicon MX system (T20 model) at the Institute for Clinical Motion Analysis. After anthropomorphic measurements, the laboratory spatial coordinate system was calibrated. Reflective markers and surface electromyogram (EMG) pads were attached to anatomical landmarks according to the plug-in walking lower body protocol. The patient walked along a predefined path while motion data was recorded. Data collection and initial processing was performed using Vicon Nexus Software (Vicon, Oxford, UK). Although the software version may have changed during the extended data collection period, the acquisition protocol, marker placement, and calibration procedures were consistent. All walking assessments were performed according to standardized clinical procedures.

This study was a retrospective analysis of previously collected clinical gait data. It was carried out in accordance with the Declaration of Helsinki and approved by the Institutional Review Board (IRB) of Gakon University Gil Hospital (IRBno. GCIRB2023-439). Data access for research purposes began on December 12, 2023 and continued until the end of the study. All data were anonymized prior to analysis.

The first dataset included 844 reports containing patient information. Data were excluded if there were no temporary walking parameters, age or sexual information, or a confirmed diagnosis of incomplete quadriplegia, incomplete paraplegia, or Cauda equina syndrome. In cases of incomplete quadriplegia and paraplegia, only cases corresponding to Asia grade C and D, indicating conservation of partial motor function were included. After applying these criteria, the final dataset consisted of 214 cases: 95 with incomplete quadriplegia, 68 with incomplete paraplegia, 51 with Cauda equina syndrome. The research flow chart is shown in Figure 6.

Figure 6
Figure 6

An overview of the research process including data preprocessing, functional selection and statistical analysis, from walking data collection to classification model evaluation.

Although approximately 75% of the initial records were excluded (47 missing temporal gait parameters, missing neurodiagnosis in 573 people, missing six ages, and missing four genders), the final data set maintained a balanced distribution of gender and age, including all three diagnostic categories. Therefore, the possibility of selection bias introduced by these exclusions is considered minimal.

Time parameters

In gait analysis, various temporal parameters were used to assess patient walking characteristics.

These parameters quantitatively measure different aspects of walking, define normal walking patterns, and serve as key indicators for detecting abnormalities or deviations in patient walking behavior.

Temporal walking parameters were automatically extracted using the Gait event detection (GED) algorithm built into the plug-in gate model. This algorithm detects major events such as heel strikes and toes based on the vertical position and velocity of the heel and toe markers without using force plates. The walking cycle from heel strike to subsequent ipsilateral heel strikes was defined. The duration of the walking cycle was calculated as the sum of step times from both feet, and parameters such as single support, double support, and foot off were converted to a percentage of total walking cycle time. Only one-sided walking cycles were analyzed to ensure consistency and comparability of all participants. Gait events were detected separately on the left and right sides, but the mean values ​​of bilateral parameters were used for machine learning classification and statistical comparisons, taking into account the symmetry of trauma-related gait disorders in patients with SCI and Cauda Equina syndrome.

The temporal gait parameters evaluated in this study were as follows:

Cadence: Number of steps per minute.

Double Support: Percentage of time that both feet are on the ground during a walking cycle.

Foot Off: The percentage of time your feet leave the ground.

Limp Index: A measure of walking asymmetry that reflects mobility disorders.

Contrary Foot Contact: Timing of the opposite foot contact when one foot hits the ground.

Contralateral foot: The percentage of time from one foot off the ground until the moment the other foot leaves the ground.

Single Support Time: The percentage of time during a walking cycle where one foot is in contact with the ground.

Step length: Distance between the initial contacts on the opposite foot.

Step Time: The amount of time it takes to complete one step.

Step width: horizontal distance of the feet.

Stride length: The distance that one foot returns to the same position.

Stride Time: The amount of time required to complete one stride.

Walking speed: Walk in 1 second.

The institutional criterion values ​​for each walking parameter were obtained from the Clinical Walking Analysis Report at Chungnam National University Hospital. These values ​​were obtained under the same measurement conditions used in this study (i.e., Vicon MX system and plug-in walking protocols) and represent standard walking performance for healthy individuals. They were used as a consistent reference baseline to support interpretation of deviations in gait characteristics among patients with neurological disorders.

Data Preprocessing

In this study, 214 cases were classified into three groups of diseases (incomplete quadriplegia, incomplete paraplegia, and Kauda strain syndrome) and analysed gait patterns. Using the isolated forest algorithm, we removed the top 1% of outliers and adjusted the class weights inversely to the sample size of each group to solve the problem of class imbalance. Weights were automatically calculated based on mutually of sample percentages per class using the SCIKIT-LEARN class weight=balance option. To address the unit discrepancies of several variables, we converted double support and single support periods, originally measured in seconds, into a percentage of walking cycle time. To do this, we calculated walking cycle times by summing the step times for the left and right feet and converting the time values ​​to percentages.

The calculation process is as follows:

  1. 1.

    Calculating walking cycle time:

    $$\:\text{g}\text{a}\text{i}\text{t}\:\text{c}\text{y}\text{c}\text{l}\text{e}\:\text\text{m}\text{e}\:\left(\text{c}\text{y}\text{c}\text{l}\text{e}\:\text{i}\text{m}\{e}\right)=\:{\text{l}\text{t}}_{\text{s}\ text {t}\text{e}\text{p}\:\text{t}\text{i}\text{m}\text{e}}+\:{\text{r}\text{t}}_{\text{s}\text{t}\text{e}\text{p}\:\text{t}\text{i}\text{m}\text\{e}}\:\:\:\:\:\:\:

    Here, LT and RT are respectively left and right.

  2. 2.

    Conversion of time values ​​into percentage units:

    $$\:\text{p}\text{e}\text{r}\text{c}\text{e}\text{n}\text{t}\text{a}\text{g}\text t{e}\:\left(\text{\%}\right)=\frac{\text{t}\text{i}\text{m}\text{e}\:\left(\text{s}\right)}{\text{g}\text{a}\text{i}\text{i}\text{t}\:\text{y}\text {c}\text{l}\text{e}\:\text{t}\text{i}\text{m}\text{e}\:\left(\text{s}\right)}\:\times\:100. $$

Features Selection and Model Training

In this study, we used SelectFromMoMtel (SFM) to select the main features of walking data. SFM uses RandomForestClassifier to calculate the importance of each feature and automatically removes it with a critical score below a predefined threshold. RandomForestClassifier can be used as a suitable tool for feature selection as it can reliably evaluate the importance of each variable, reflecting nonlinear relationships and interactions between variables. Although SFM was initially selected based on interpretability and performance in preliminary tests, we further evaluated three alternative feature selection methods (RFE, Lasso, and Ridge Regression) to verify the robustness of the approach. Each method was applied independently using the same pretreatment pipeline.

Thresholds were automatically determined as the importance of the average feature to exclude features that were less relevant. Based on the selected features, we trained three classifiers: Support Vector Machine (SVM), Random Forest (RF), and Extreme Gradient Boost (XGB). To solve the multiclass problem, one VS rest (OVR) strategy was applied to convert it into multiple binary classification problems. The OVR strategy trains the binary classifiers for each class by grouping the remaining classes into a single group. This effectively utilizes the performance of binary classification-based algorithms such as SVM for multi-class issues. GridSearchCV was used to optimize hyperparameters and cross-validation was used to determine the optimal hyperparameter combination to maximize the generalized performance of the model.

Model Evaluation Metrics and Statistical Analysis Methods

Model performance was assessed using 5x StratifiedKFold cross-validation, with 80% of the data being used for training and 20% being used for validation of each fold. StratifiedKFold splits the data so that each fold maintains a percentage of the class of the original data. This helps minimize the problem of class imbalance. The model's multiclass classification performance was assessed based on true positives, true negatives, false positives, and false negatives obtained by comparing actual and predicted values. Accuracy, accuracy, recall, and F1 scores were used as evaluation metrics. Receiver operating characteristics (ROC) curves were also analyzed to assess the classification performance of the model and to calculate the area under the ROC curve (AUC). AUC values ​​range from 0 to 1, and values ​​approaching 1 reflect the performance of the excellent model. Finally, we analyzed the classification performance of each class (incomplete quadriplegia, incomplete paraplegia, Cauda equina syndrome) using a confusion matrix. The confusion matrix provides a visual representation of the relationship between model predictions and actual classes, indicating the number and type of misclassified samples. This was used to assess the trends in models that overpredict or misclassify specific conditions. We statistically analyzed differences in walking variables between groups divided by gender and age (<60 vs. ≥60 years) and differences in model performance between classifiers. The Shapiro -Wilk test was run to evaluate the normality of each variable. Variables that violated the normality assumption were analyzed using the Mann-Whitney U test, whereas variables with the normally distributed variables were compared using an independent sample T test. False detection rate (FDR) correction was applied to analyses of walking parameters to control inflation for type I errors due to multiple comparisons. Statistical significance was determined using FDR adjusted p-values p<0.05 is considered important. All statistical analyses were performed using IBM SPSS Statistics version 20 (IBM Corp., Armonk, NY, USA).



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *