Development of Neuro-Degenerative Diseases’ Gait Classification Algorithm using Convolutional Neural Network and Wavelet Coherence Spectrogram of Gait Synchronization

Objective: A neurodegenerative disease (NDD) detection algorithm using a convolutional neural network (CNN) and wavelet coherence spectrogram of gait synchronization was developed to classify NDD based on gait force signals. The main purpose of this research was to help physicians with screening for NDD for early diagnosis, efficient treatment planning, and monitoring of disease progression. Methods: The NDD detection algorithm was evaluated using the existing online database from Physionet by Hausdorff et al., called gait in neurodegenerative disease database, comprised windowing, feature transformation, and classification processes. Force pattern variations among healthy control (HC) and patients with ALS, HD, and PD were distinctly observed from feature-extracted wavelet coherence spectrogram images. Results: HC were balanced because their left and right feet supported each other when walking. In patients with ALS, left–right foot correlation was weaker than that in HC. In patients with HD, walking velocity varied, which indicated that only one foot (right or left) was dominant and sustained the entire body’s balance during movement. The left and right feet of patients with PD were correlated and coordinated in terms of supporting lower-body movements. The right foot was always on the ground to support the entire body when walking. Conclusion: The proposed NDD detection algorithm effectively differentiates gait patterns on the basis of a time-frequency spectrogram of gait force signals between HC and NDD patients with the overall sensitivity of 94.34%, specificity of 96.98%, accuracy of 96.37%, and AUC value of 0.97 using 5-fold cross-validation.


I. INTRODUCTION
eurodegenerative diseases (NDD), such as amyotrophic lateral sclerosis (ALS), Huntington's disease (HD), and Parkinson's disease (PD), are defined as the progressive death of neurons through the loss of neuron structure and function in different regions of the nervous system [1]; for example, PD is the second-most common NDD, with a prevalence of ~0.3% in the general population, ~1% in the elderly (>60 years old), and ~3% in people aged >80 years [2]. Its incidence rate is 8-18 persons per 100,000 person-years, the median age at onset is 60 years, and the mean disease duration from diagnosis to death is ~15 years [2]. There is a 1.5-2 times greater prevalence of PD and incidence in men than in women [2]. Medication for PD treatment costs $2500 each year, and therapeutic surgery costs up to $100,000/patient [3]. ALS, as the third-most common NDD and the most common motor neuron disease, has an estimated incidence of 1.9 people per 100,000 per year [4,5]. In the United States, 30,000 people have ALS, 30,000 have HD, and 1 million have PD [6]. NDD develop primarily in mid-to late life, and the incidence is expected to rise with the increasing aging population. In 2030, as many as 1 of 5 Americans will be >65 years old, and by 2050, more than 12 million Americans might suffer from NDD [7]. Early detection as well as the development of NDD treatments are an ultimate goal of increasing exigency. NDD can influence many of the body's activities, such as heart beat regulation, respiration, speech, mental functioning, balance, and movement. Since general motions (flexion and extension) of the two lower limbs are regulated by the central nervous system (CNS), especially basal ganglia, the gait of a patient with NDD would become abnormal (different gait pattern compared with a healthy person) because of the decadence of motor neuron function [8].
ALS causes the death of neurons controlling voluntary muscles and is characterized by stiff muscles, muscle twitching, N and gradually worsening weakness because muscles decrease in size [9][10][11]. HD is a hereditary disorder that results in the death of brain cells followed by a lack of coordination and an unsteady gait, and in the advances stage, uncoordinated and jerky body movements become more apparent [12][13][14]. PD is a long-term degenerative disorder of the CNS that mainly affects the motor system. The most obvious symptoms in the early stage are shaking, rigidity, slowness of movement, and difficulty in walking [15][16][17]. Therefore, NDD affect the foot force, and gait information developed for movement analysis in healthy controls (HC) and other subjects with different kinds of diseases is useful for understanding movement disorder in NDD and has potential in performing noninvasive automatic classification of NDD.
Gait analysis research has been developed in several decades based on temporal/spatial features and pressure measurements, such as the time series of stride, stance, or swing intervals; ground reaction force (GRF); and foot force. Gait analysis can also be used to assess and treat individuals with diseases that affect their ability to walk. Gait synchronization between left and right foot during natural walking, as one of the gait analysis assessments, is a repeatable phenomenon that is quantifiable and is apparently related to available sensory feedback modalities of nervous system. One significant and important parameter to be considered for the discrimination of different NDD is synchronization of left and right gait force signal.
The wavelet coherence spectrogram is possible to distinguish the NDD gait abnormal phenomenon, specifically, whether ALS, HD, and PD interfere with the patient's ability to manage the propulsion of the two feet and whether a significant difference in gait force is related to the stage of the disease. A spectrogram is used as a visual representation of a signal over time at various presence frequencies and has been applied for many physiological signals' visual representation and analysis [18][19][20][21] to be fed as the input of machine and deep learning algorithm. This study was focused on the development of the algorithm and evaluated using the existing online database from Physionet.

A. GAIT DATA ACQUISITION SYSTEM
In recent decade studies, measuring gait have generally involved the use of force plates, accelerometers, and camerabased systems, as well as measuring abnormality in the gait of patients with NDD.

Force Plates or Sensors
Hausdorff et al. [10] implemented force-sensitive insoles in the shoes of ALS patients and assessed their gait dynamics. The patients were ordered to walk with their normal walking pace along a 77 m hallway for 5 minutes. Grimbergen et al. [22] observed the falls and gait disturbances in patients with HD using a pressure sensitive walkway (GaitRite).

Accelerometers
Salarian et al. [23] measured the angular rate of the rotations from the PD patients using gyroscopes. Four miniature uniaxial piezoelectric gyroscopes (Murata, ENC-03J) were placed on the lower limbs of the patients. Hsu et al. [24] proposed a complete analysis for placement of multiple wearable sensors with the aim of observation and classification of the gait of patients with neurological disorders. Seven wireless IMU sensors from Delsys TrignoTM were utilized, and each consisted of a triaxial accelerometer, a gyroscope, and a magnetometer.

Optical Motion Capture
Koh et al. [25] investigated gait dynamics and kinematics in PD subjects with an Oxford Metrix Vicon 512 motion analysis system and correlated these features with the major clinical features and the existence of the freezing of gait. Karakostas et al. [26] established a 3D motion analysis for detecting patients with PD using rodent models. The position and movement of each rodent with a marker in 3D space was observed by a 6camera VICON optical capture system using MX13 cameras with a 1.3 MP resolution, a maximum absolute error less than 0.5 mm, and filming at 240 Hz.
Combinations Sofuwa et al. [27] did gait analysis of PD patients conducted using an 8 M-camera Vicon 612 data capturing system set at 120 Hz with 3 AMTI force plates placed midway on an 8-meter walkway. Pham et al. [28] built a step detection algorithm during straight walking and turning for PD subjects and elderly people using an inertial measurement unit (IMU) mounted at the lower back of the subjects. A single 6-degrees of freedom IMU (3DOF accelerometer and 3DOF gyroscope) was used on the lower back and validated using an optoelectronic system (VICON).

B. NDD GAIT CLASSIFICATION ALGORITHM USING MACHINE LEARNING AND DEEP LEARNING
Machine learning (ML) and deep learning (DL) offer an algorithm to understand the best clinical related spatiotemporal gait features to address problems around disease classification. Recently, in order to facilitate automatic NDD identification, some earlier works have been proposed using ML and DL algorithms based on spatiotemporal gait extracted features (as shown in TABLE 1). Zeng et al. presented the gait dynamics method to classify (diagnose) NDD using deterministic learning theory [29]. Xia et al. proposed a method of classifying gait rhythm signals for patients with NDD and HC [30]. They conducted experiments with statistical features and different classification models. Ertuğrul et al. developed shifted 1D local binary patterns to detect PD on the basis of vertical GRF [31]. Wu et al. measured signal fluctuations in the gait rhythm time series of patients with PD using entropy parameters [32]. They computed the approximate entropy (ApEn), normalized symbolic entropy, and signal turn count parameters for stride fluctuation measurement in PD and used generalized linear regression analysis and support vector machine (SVM) to classify nonlinear gait patterns. Bilgin studied the impact of feature extraction on the classification of ALS among NDD and HC [33]. A compound force signal, as the input signal, was deciphered for feature extraction using a six-level discrete wavelet transform with several kinds of wavelet techniques using linear discriminant analysis (LDA) and the naive Bayesian (NB) classifier. With the utilization of a random forest classifier, Yan et al. carried out a topological motion analysis (TMA) framework to investigate multiple gait fluctuations in the NDD classification [34]. Fraiwan et al. executed a credible computer-aided framework to recognize gait fluctuations of NDD and performed a statistical analysis and classification using decision tree (DT)-based ensemble methods [35].
Zhao et al. implemented a DL algorithm dual-channel long short-term memory (LSTM)-based multi-feature extraction on gait to diagnose NDD [36]. Their dual-channel LSTM model merged time series and force series recorded from patients with NDD for whole-gait understanding. Using convolutional neural network (CNN), Lin et al. classified multi-class NDD based on recurrence plot extracted feature of vertical GRF [37]. To offer a contribution to the walking patterns analysis, Paragliola et al. generated synthetic gait time series dataset in order to address the over-fit issue caused by small sample dataset and presented the combination of CNN and LSTM deep learning approach [38]. Setiawan et al. applied several DL models in order to predict severity level of patient with PD based on the timefrequency spectrogram of the vertical GRF [39]. Berke Erdas et al. proposed a deep learning-based approach using gait data represented by a quick response code to develop an effective and reliable disease severity grading system for NDD [40].

C. NDD GAIT SYNCHRONIZATION
Gait synchronization is a measurable repetition occurrence that appears to be related to available sensory feedback modalities. Nevertheless, the investigation into the mechanisms underlying this phase-locking of gait has only recently begun. Bartsch et al. studied the effect of PD for long-term fluctuation and phase synchronization of gait timing as well as gait force profiles. They found that the fluctuations of gait timing in PD patient are significantly larger and the long-term correlations and the phase synchronization of left and right leg are significantly reduced in PD patient [41]. Baratin et al. introduced a wavelet-based method to effectively characterize gait associated with certain NDD [42]. They investigated the asymmetry between the foot data and the irregularity of the stride interval seems to efficiently characterize the ALS, HD, PD, and HC. Ren et al. applied phase synchronization and conditional entropy to the five types of time series pairs of gait rhythms [43]. The results declared that compared with the ALS, HD, and PD patients, gait rhythms of HC had the strongest phase synchronization property and minimum conditional entropy value. Zivotofsky et al. utilized a dual tasking paradigm in order to observe the role attention presented in gait synchronization [44]. Ye et al. employed a novel method based on an adaptive neuro-fuzzy inference system (ANFIS) for the identification of the patient's gait with NDD and modelling the nonstationary human gait dynamics between left and right foot [45].
The main contribution of this study are as follows: 1. The effectiveness and the first application of the synchronization of left foot (LF) and right foot (RF) using wavelet coherence time-frequency spectrogram based on gait foot force for NDD classification 2. Excellent state of the art NDD classification results and the explainable capabilities of the developed NDD classification algorithm using deep learning based on Grad-CAM analysis 3. Realistic and applicable multi-class classification on the NDD diagnostic system The paper is organized as follows: Section II summarizes the literature review on the techniques of gait assessment used in the NDD gait analysis: the data acquisition, gait classification algorithm, and gait synchronization. Section III describes the database and methodology used in this study. Section IV explains the experiment arrangements and NDD classification results. Section V provides the discussion of explainable results based on the pattern visualization and the comparison results with the existing NDD classification algorithm. Finally, conclusion and future work are presented in section VI.

III. MATERIALS AND METHODS
In the NDD detection algorithm, raw signal data were obtained using force-sensitive resistors, the output being roughly proportional to the force under the foot [46]. The left foot force (gait) signal (LFS) and the right foot force (gait) signal (RFS) of patients with NDD and HC were used as input. Feature transformation using wavelet coherence was applied to the input to create new features (a time-frequency spectrogram) using existing features. For classification improvement, principal component analysis (PCA) was applied to the timefrequency spectrogram by selecting principal components (PCs) of the features. The PCs of HC and NDD subjects were divided into a training and a testing set. Estimators were built by training the training sets. By comparing the estimators with a test set of HC or NDD to be classified, a few classification parameters were generated. A CNN was successfully applied to classify HC and NDD in the classification stage (training and testing phases). The NDD detection algorithm attempted to extract pattern features and visualization from gait force signals in ALS, HD, and patients with PD and HC by transforming 1D signals into 2D pattern objects (images) using feature transformation from wavelet coherence. The NDD detection algorithm involved four main steps, as shown in FIGURE 1: (1) signal preprocessing of NDD and HC gait force signals, (2) feature extraction by generating a spectrogram of the gait force signal using wavelet coherence and PCA, (3) construction of a classifier model by feature training using a pretrained AlexNet CNN, and (4) cross-validation to test and analyze the effectiveness of the NDD detection algorithm.

A. NDD GAIT DATABASE
Gait in Neuro-Degenerative Disease database, which is provided online in the Physionet by Hausdorff et al. (2019), was used for validation and evaluation of this study [47]. The database contained 64 recordings from 13 ALS, 20 HD, and 15 patients with PD and 16 HC. Two types of data were recorded: raw data of the force series and the derived time series from the raw data. The force series consisted of LFS and RFS. The contents of the time series data were left stride interval (s), right stride interval (s), left swing interval (s), right swing interval (s), left swing interval (% of stride), right swing interval (% of stride), left stance interval (s), right stance interval (s), left stance interval (% of stride), right stance interval (% of stride), double-support interval (s), and double-support interval (% of stride).
The transducer, which was utilized for gait data acquisition on the database, was a conductive polymer layer sensor with altered resistance when loaded. The sensor was selected because its thickness is <0.05 in, it is temperature insensitive, and it has a fast-dynamic response, the ability to restrain overload, and an electronically easy interface. Two 1.5 in2 force-sensitive resistors were applied and taped to an insole that was used to place the sensor inside the shoe. The insole was made from a Manila folder by tracing an outline of the foot on it and then cutting out the tracing. One sensor was located in the anterior part of the insole, approximately under the phalanges (toes) and metatarsals, and the other sensor was at the opposite end, under the heel. The two footswitches were connected in parallel and fundamentally served as one large sensor (the output from the two footswitches was added). The output voltage of the switch ranged from 0 V with no loading to 3.5 V with full loading (closed). The analog signal was digitized and analyzed using software [46].

B. SIGNAL PRE-PROCESSING
A 5 min gait force signal was acquired during data collection. Because of the length of the gait force signal, it was difficult to interpret the gait force data despite using wavelet coherence to transform features. To vividly observe the gait force signal, the window function was used that is zero-valued outside some selected interval. In this study, 10, 30, and 60 s time windows were applied. As mentioned before, there were 13 ALS, 20 HD, 15 patients with PD and 16 HC used and observed, but the input signal depended on the window size in the time-windowing process and frequency selection. For the 10 s time window, there were 480 HC, 390 ALS, 600 HD, and 450 PD input signal numbers; in the 30 s time window, 160 HC, 130 ALS, 200 HD, and 150 PD input signal numbers; and in the 60 s time window, 80 HC, 65 ALS, 100 HD, and 75 PD input signal numbers. The time-windowing process was also used in order to obtain more data as the input of the deep learning model and simulate more precise and fast disease prediction.

C. WAVELET COHERENCE
Wavelet coherence is a well-established and standard tool to analyze the linear correlation between two signals by specifying the relation between their spectra. It can recognize both frequency bands and time intervals when the time series are still related. Wavelet coherence is significant for analyzing nonstationary signals. Wavelet coherence was denoted as the square of the cross-spectrum normalized by the individual power spectra [48]. In Fourier analysis, it is necessary to smooth the cross-spectrum before calculating coherency [49]. Torrence and Webster (1998) defined the wavelet coherence of two time series, X and Y, as the absolute value of the smoothed cross-wavelet spectrum squared, normalized by the smoothed wavelet power spectra [50]: transform of X and Y signals, respectively. The cross-wavelet was calculated from the two CWTs and revealed regions with high common power and further information about the phase relationship [51]. If the two series were physically related, a consistent or slowly varying phase lag that could be examined when mechanistic models of the physical process were observed. The phase relationship could be inspected from the circular mean of the phase angles. Also, wavelet coherence could be calculated from the two CWTs, which could be considered the local correlation between the time series in timefrequency space. The cross-wavelet exposed high common power, whereas wavelet coherence discovered locally phaselocked behavior. The more desirable features of the wavelet coherence were found somewhat less in time-frequency space.
In this wavelet coherence computation, we used the analytic Morlet wavelet. The time-frequency spectrograms for NDD and HC groups are shown in FIGURE 2, FIGURE 3, FIGURE 4, and FIGURE 5. As denoted in FIGURE 2, in the red box, the HC spectrogram had the repeated, regular and strong intercorrelation pattern visualization at a certain frequency rage. This did not appear in the NDD spectrogram (FIGURE 3, FIGURE 4, and FIGURE 5), which on the contrary formed an irregular pattern visualization. This phenomenon indicated that, while HC walk, left and right feet assist each other to maintain the body balance. The stance and stride activities of both feet are equally distributed.

D. PRINCIPAL COMPONENT ANALYSIS
The main idea of PCA is to perform dimensionality reduction of a dataset containing a major number of interrelated variables while resisting the variation present in the dataset as much as possible [52]. This is done by transforming the dataset into a new set of variables, PCs, which contains ordered de-correlated variables.
The PCA method was mathematically defined as follows: (1) A matrix = [ 1 ; 2 ; 3 ; . . . ; ] was constructed by spectrogram images of all NDD and HC, where is a row vector comprising the pixels of a spectrogram image of NDD or HC and i is the number of spectrogram images of all NDD and HC. (2) The PC was built using the equation (also called a covariance matrix of the matrix ) to subsequently find its eigenvalues and eigenvectors. (3) The matrix, an × matrix of weights whose columns are the eigenvectors of , was obtained. (4) Finally, the matrix of extracted feature F was described as the full PCs' decomposition of and was, therefore, shown in the equation = . The purpose of using PCA as feature enhancement was to increase the between-class separability and minimize the within-class separability of datasets, thereby improving the machine learning and artificial intelligence performance in classifying data points into the correct group.

E. CONVOLUTIONAL NEURAL NETWORK
A CNN comprises one or more convolutional layers (often with subsampling and pooling layers), followed by one or more fully connected layers, as in a basic multilayer neural network (deep learning) [53]. The CNN architecture is built to take benefit of the 2D structure of the input (image), which is accomplished with local connections and involves weights, followed by any pooling function that results in translationinvariant features. A CNN is also simpler to train and has significantly fewer parameters compared with other fully connected networks with the same number of hidden layers.
The main reason for using a CNN was to distinguish the time-frequency spectrogram pattern representation, which are in two-dimensional structure, of gait force between HC and patients with NDD. A pretrained AlexNet CNN was employed from the MATLAB R2018a Deep Learning Toolbox TM . The architecture (see FIGURE 6) contains 25 layers, including 1 input layer, 5 convolution 2D layers, 7 rectified linear unit layers (ReLU) as the activation function, 2 cross-channel normalization layers, 3 max pooling 2D layers, 3 fully connected layers, 2 dropout layers (for regularization), 1 softmax layer (normalized exponential function), and 1 output layer. A pretrained AlexNet CNN was applied in this study since balance performance between classification accuracy and computation time can be achieved. The utilization of ReLU activation function on the pretrained AlexNet does not limit the output so that there is low feature loss. The data enhancement, dropout, and normalization layers are also given the benefits to prevent the network from overfitting and improve the model generalization. The pretrained AlexNet CNN also had been justified by some studies to be engaged with the gait force data analysis and classification.
The pretrained AlexNet CNN input was the pattern visualization of the gait force signal yielded by the timefrequency spectrogram wavelet coherence. In the proposed algorithm, the pretrained AlexNet CNN was utilized as the feature extractor. This is simple to apply in less time, as it is faster and fewer attempts for training than training the full network. full network. By using this simple and time-efficient methodology, the integration of wearable device with the algorithm becomes more possible and promising. This method only applies two earlier fully connected layers and uses a support vector machine (SVM) for classification. FIGURE 6. The convolutional neural network (CNN) architecture that was used in this proposed NDD detection algorithm, consisted of input layer, convolution 2D layer, ReLU layer, cross-channel normalization layer, max pooling 2D layer, fully connected layer, dropout layer, softmax layer, and output layer.

F. CROSS-VALIDATION
Cross-validation is a statistical method of assessing and comparing learning algorithms by dividing data into two groups: one used to learn or train a model (training set) and the other used to validate the model (testing or validation set) [54].

1) Leave-One-Out Cross-Validation (LOOCV)
LOOCV is a specific case of a k-fold cross-validation, where k is the number of data points. In each iteration, almost all the data points except for one are used for learning, and the model is validated on that one data point. Accuracy estimation obtained using LOOCV is almost unbiased, but it has high variance, inferring unreliable estimates. It is still often applied when available data are rare, especially in bioinformatics datasets, where only a few data samples are available.

2) k-fold Cross-Validation (k-foldCV)
In k-foldCV, k equally (or almost equally) sized groups or folds are established by first partitioning data points. Consequently, k iterations of training and validation are performed such that within each iteration, a different fold of data points is applied for validation, whereas the remaining k-1 folds are used for learning. Data are usually stratified before being divided into k-folds. Stratification is the process of reorganizing data in order to confirm that each fold is a good representative of the entire sample. In this study, 5-foldCV and 10-foldCV (for classification comparison purpose) were employed.

IV. EXPERIMENT AND RESULTS
The experiments were carried out using MATLAB R2018a software on an NVIDIA GeForce GTX 1060 6 GB computer with 24 GB RAM and conducted using existing online database from Physionet. The computation time is affected by the number of input time-frequency spectrogram images (related to the time windowing process where smaller time windowing will result in more images and computation time becomes longer) and the number of the neurons in the CNN. The multiclass classification for the HC and NDD subjects was also evaluated. This approach is representative of real-life applications, because doctors and neurologists do not have preliminary information about whether a patient is healthy or suffers from PD and, if the latter, what is the severity.
The sensitivity, specificity, accuracy, and an AUC value of the proposed method were included as parameters for evaluation. The detail definition of each evaluation parameter is provided in [55]. When selecting between diagnostic tests, Youden's index is often applied to evaluate the effectiveness of a diagnostic test [56]. Youden's index is a function of sensitivity and specificity, and its value ranges between 0 and 1. A value close to 1 indicates that the diagnostic test's effectiveness is relatively high and the test is close to perfect, and a value close to 0 indicates poor effectiveness, where the test is useless. Youden's index (J) is the sum of the two fractions indicating the measurements correctly diagnosed for the diseased group (sensitivity) and healthy controls (specificity) over all cut-points , −∞ < < ∞:

A. NDD and HC Group
Detailed results of the three kinds of classification tasks performed (patients with ALS compared with HC, patients with HD compared with HC, and patients with PD compared with HC) are given in TABLE 2 and FIGURE 7.

B. Among the Three NDD
The ALS group was readily distinguishable from HD and PD groups; however, HD and PD groups were not easy to separate. The HD versus PD classification results were less compared with ALS versus HD and PD versus ALS classification results because HD and PD are caused by degeneration of basal ganglia and gait patterns of HD and patients with PD are almost identical [57], see TABLE 2, FIGURE 7, and FIGURE 8.

C. All NDD in One Group and the HC Group
In the NDD versus HC classification, the gait force datasets of patients with ALS, HD, and PD were merged into one group, depending on the time-windowing size, see TABLE 2 and Fig. 5 (left).

D. Multi-class Classification
Multi-class classification is more realistic, practical, and novelty of this study in the field of NDD classification. The entire gait force dataset was divided into four classes on the basis of the patients with disease (ALS, HD, or PD) and HC. LOOCV and 5-foldCV were also applied for evaluation and validation. Detailed classification results of multi-class classification are given in TABLE 3 and FIGURE 8.

A. Visualization of Convolutional Neural Network Feature Map using Gradient-Weighted Class Activation Mapping
Deep neural networks and especially complex architectures like CNNs were long considered as pure black box models. Gradient-weighted Class Activation Mapping (Grad-CAM) is possible to produce visual explanation and make CNNS more transparent and explainable [58]. Grad-CAM requires a set of weight coefficients from the CNN trained model to merge feature maps. This is accomplished by first computing the gradient of the decision of interest with respect to each feature map and then conducting global average pooling on the gradients to obtain scalar weights. Consequently, Grad-CAM avoids adding unnecessary layers, allowing for the resolution of both model-retraining and performance-decrease issues. Thus, the feature map from the final convolution layer and the corresponding weight are important for feature visualization.
Grad-CAM uses the backpropagation method to calculate the gradient of each pixel on the feature map of unit k for class c. The weight of feature map is obtained by weighted average the weight from each pixel as: is the value of gradient calculated by class c ( which the score before softmax layer) and the feature map ; Z presents the number of pixels on the feature map. − is generated by using ReLU to compute the linear combination of the value that different weights multiply by different feature maps expressed by the following equation: The function of ReLU make the value of

B. Pattern Visualization of NDD Spectrogram
It is difficult to observe some key features of a signal with the naked eye, but time-frequency spectrogram analysis can help us discover some important information about time and frequency characteristics. The gait phenomenon of NDD and HC can be easily observed from pattern visualization and recognition of the time-frequency spectrogram.
In gait analysis, wavelet coherence analysis makes it possible for us to observe the LF-RF gait signal correlation in the timefrequency plane. The wavelet coherence time-frequency spectrogram can be interpreted as follows (see FIGURE 9): • The horizontal axis represents the period of time, whereas the vertical axis displays the frequency. • The colored bar represents the relation between the series signals. Warmer colors (yellow) indicate a domain with a stronger interrelation between the left and right feet, whereas cooler colors indicate less subordination between the series. • An arrow in the time-frequency spectrogram signifies lead/lag phase correlations between the observed signals. Arrows point to the right when the LFS and RFS are in the same phase (they move in the same direction). When the LF and RF forces are in the antiphase, the arrows point to the left (they move in the opposite direction). The right-down or leftup arrows signify that the LFS is leading the RF, whereas arrows directed upward right or left in the downward direction mean that the RFS magnitude is leading the LF.

1) Healthy Control
As shown in FIGURE 9(d), in a normal gait, there was a solid strongest region in the 0-1.9 Hz frequency range, which is the frequency of a normal person walking. This indicated that when HC walk, their left and right feet support each other, and they are balanced. The spectrogram also showed no correlation between the left and right feet of HC at the 2-4 Hz frequency band. In the 0-1.9 Hz prominent frequency region, all phase arrows pointed to the left, indicating that the left and right footsteps for a normal gait are always in the antiphase (different 180° in phase). At the 4-16 Hz frequency band, there was a regular pattern that had a significant magnitude (yellow-blue) to be investigated. It had specific phase arrows, right-up or leftup followed by right-down or left-down phase arrows, that alternated, which confirmed that a normal person typically will start walking with the RF (the RF is on the ground while the LF is swinging) as the dominant foot and alternate with the LF (the LF is on the ground while the RF is swinging). At a higher frequency, there were still correlation components but only a few phase arrows, indicating that high-frequency components do not occur because of an imbalance in the body or unsteady walking.
In the grad-CAM heatmap results, the strongest power mostly appeared at the frequency of 2-16 Hz and had consistence power at the whole gait cycles. This phenomenon also indicated that the left and right foot of HC subject were highly correlated with the dominant frequency around 2-16 Hz.

2) Amyotrophic Lateral Sclerosis
As clearly shown in FIGURE 9(a), the LF-RF correlation of patients with ALS was weak compared with HC. At the normal walking 0-1.9 Hz frequency band, the magnitude areas were divided into four correlations: (1) the strongest correlation magnitude area at 0-0.25 Hz (orange), where phase arrows pointed to the right; (2) the lower correlation magnitude area at ~0.25-0.5 Hz (yellow-blue and blue); (3) the strongest correlation magnitude area at 0.5-1 Hz, where some phase arrows pointed to the left and others pointed to the top left; and (4) the lower correlation magnitude area at 1-1.9 Hz (yellowblue and blue). The left and right feet of patients with patients with ALS could not maintain good coordination because their walking was unsteady. This was also shown by some strongest correlation magnitude regions at a particular time in the 2-16 Hz frequency band, since in a normal gait, there was no left-RF correlation at 2-4 Hz (see, for example, at 5-6 s and at ~8 s). At the 5-6 s time point, this area's phase arrows pointed to the left (up and down), indicating that at a specific frequency, the RF is leading, whereas at the other frequency, it is lagging. Around the 8 s time point, this region's phase arrows pointed to the right (up and down), and at the same time point, the right-down phase arrows seemed to turn to the left at the lower frequency (4-2 Hz). The ALS wavelet coherence spectrogram also showed that high-frequency components occur because the patients with ALS walk unsteadily and improperly, since the phase arrows are arbitrary.
The grad-CAM heatmap showed the strongest power only appeared at the frequency of 1-16 Hz and at certain gait cycles. This phenomenon indicated that the correlation between LF and RF was only occurred at some certain walking period.

3) Huntington's Disease
As denoted in FIGURE 9(b), HD patients' walking velocity varied, but only one foot (right or left) was the dominant foot and sustained the balance of the entire body during movement. The dominant correlation magnitude region of patients was at 0.25-1.5 Hz, where the phase arrows pointed to the left. Here, the LF-RF correlation was similar to that of HC when walking. Because of jerky, uncoordinated movements caused by HD, high-frequency components of the HD spectrogram were affected. From >2 Hz to a higher frequency, there were irregular, strong magnitudes, with phase arrows pointing in various directions. At ~2-4 Hz, there were some significant correlation magnitude regions because phase arrows pointed down and to the right at different frequencies. After ~1 s of movement, at 4-20 Hz, there was another phenomenon led by the symptom; the spectrogram shows that at 8 Hz, the phase arrows of a strong correlation magnitude (yellow-blue) were in the right position and changed to a left-downward direction at a lower frequency  and to an upward and left direction at a higher frequency (8)(9)(10)(11)(12)(13)(14)(15)(16)(17)(18)(19)(20).
Whereas, the grad-CAM heatmap results presented the strongest power only appeared at frequency around 0.5-20 Hz and at certain gait cycles. The strongest power's dominant frequencies were also inconsistently changed at certain gait cycles: on the original spectrogram, 0.5-8 Hz at 5-8 s gait cycle; on the phase arrows spectrogram, 8-20 Hz at 5-6 s and 0.8-8 Hz at 6-8 s). This phenomenon also emphasized the jerky and uncoordinated movements caused by HD.

4) Parkinson's Disease
The LF and RF of patients with PD still had correlation and coordination in terms of supporting lower-body movements, as shown in FIGURE 9(c). The RF was always on the ground to support the entire body when patients with PD walked (hobbling, imbalanced walking). The wavelet coherence spectrogram of patients with PD was similar to that of HC, especially in the strongest correlation magnitude region (yellow, orange, and yellow-blue) and slightly less compared with HC at 0-1.5 Hz, and phase arrows pointed to the left. The spectrogram also had a significant correlation magnitude (orange) area at 2-4 Hz (in the gait of a normal person, there was no correlation), with phase arrows pointing to the right-up (RF force magnitude always leads that of the LF). In the higherfrequency band, the left and right feet showed significant correlation, and phase arrows seemed to vary in terms of direction because tremor symptoms of patients with PD should appear as high-frequency components.
However, the grad-CAM heatmap results described the strongest power mostly occurred at frequency of 1-24 Hz and at whole gait cycle but with inconsistence power. The dominant frequencies of the strongest power were also arbitrarily changed at certain gait cycles. This inconsistence powers in the high frequency specified the tremor of PD.

C. Comparison Result with Existing Literature
The two-class classification results were compared with those of studies conducted by Zeng et al. [29], Zhao et al. [36], Pham T.D. [59], and Ren et al. [60] using the same existing online database from Physionet for their method validation. These comparison results are shown in  Nevertheless, since the multi-class of NDD classification is the novelty in this study field, those classification results were only possible to be compared with the previous authors' studies (Lin et al. [37] and Setiawan et al. [61], presented in TABLE 7). Lin et al. evaluated the pattern visualization of NDD's GRF using recurrence plot and deep learning method with LOOCV. Setiawan et al. classified the NDD's GRF based on timefrequency spectrogram generated by continuous wavelet transform, short-time Fourier transform, and wavelet synchrosqueezed transform. They also applied deep learning algorithm with LOOCV and 5-foldCV as the evaluation.
In conclusion, the proposed method outperformed the classification performances of Zeng et al., Zhao et al., Ren et al. and Setiawan et al. studies. The NDD detection algorithm proposed by Pham obtained better results compared with the proposed NDD detection algorithm in the PD vs. HC classification. However, in the ALS vs. HC and HD vs. HC classifications, the results were the same with regard to performance in terms of all evaluation parameters. However, Pham also used LDA and LOOCV for PD vs. HC classification, with poor classification results; the accuracy achieved was only 77.42%.

VI. CONCLUSIONS AND FUTURE WORK
A novel artificial intelligence-based NDD detection algorithm using wavelet coherence time-frequency spectrogram based on gait force signals was successfully implemented and evaluated using the existing online Physionet database. Pattern visualization and recognition of the timefrequency spectrogram helped us successfully differentiate between the gait phenomenon of patients with NDD and HC. Feature transformation methods, using wavelet coherence, visualized the spectrogram of gait foot force signals by transforming the signals from the time domain into the timefrequency domain. The NDD detection algorithm achieved the highest performance for >96% of the parameters being evaluated and achieved superior performance compared with state-of-the-art NDD detection methods found in the literature.
This study had a few areas of improvement, although the NDD detection algorithm obtained importance performance evidence. First, the existing online database that was used had a limited number of patients with NDD, so clinical data should also be obtained for verification. The clinical data collection can be recorded using our own smart insole built with an embedded 0.5 in force-sensing resistor. The patients with NDD will perform simple daily activities, such as turn around and sit, instead of only walking along a pathway. Second, long-term data collection for monitoring NDD progression would be meaningful for NDD treatment since the gait pattern of patients with NDD should change in long-term disease progression. Third, to ensure clinical significance, the NDD gait phenomenon based on a time-frequency spectrogram should be discussed with physicians. Fourth, other input data (e.g., kinetic data, temporal data, step length, and cadence) and classifiers should be applied to confirm and compare the effectiveness of pattern visualization and recognition based on the use of a timefrequency spectrogram in NDD detection applications.
In this study, the time-frequency spectrogram was is successfully applied to differentiate the gait phenomenon between patients with NDD and HC on the basis of pattern visualization and recognition using a deep-learning classifier. Pattern visualization and recognition of NDD gait phenomena also can be implemented and observed using a fuzzy recurrence plot. A deep-learning gait classification algorithm using fuzzy recurrence plot images is also possible for future improvement on NDD gait classification.