Assessment of Waveform Similarity in Clinical Gait Data: The Linear Fit Method

The assessment of waveform similarity is a crucial issue in gait analysis for the comparison of kinematic or kinetic patterns with reference data. A typical scenario is in fact the comparison of a patient's gait pattern with a relevant physiological pattern. This study aims to propose and validate a simple method for the assessment of waveform similarity in terms of shape, amplitude, and offset. The method relies on the interpretation of these three parameters, obtained through a linear fit applied to the two data sets under comparison plotted one against the other after time normalization. The validity of this linear fit method was tested in terms of appropriateness (comparing real gait data of 34 patients with cerebrovascular accident with those of 15 healthy subjects), reliability, sensitivity, and specificity (applying a cluster analysis on the real data). Results showed for this method good appropriateness, 94.1% of sensitivity, 93.3% of specificity, and good reliability. The LFM resulted in a simple method suitable for analysing the waveform similarity in clinical gait analysis.


Introduction
Instrumented gait analysis (GA) allows for gathering quantitative information about joint kinematics and kinetics of the musculoskeletal system during gait. A critical issue in the field of human movement analysis refers to the data comparison and the assessment of the deviation of the gait pattern under analysis from reference data through a few meaningful indices [1]. The need to assess the similarity between two curves of gait data is encountered in a large variety of different scenarios, for example when two datasets are obtained using different instrumentations [2][3][4], using different protocols [5][6][7], before and after treatment [8,9], or especially for comparing pathological gait data related to a patient (or a group of patients) to physiological gait data related to healthy subjects [10][11][12].
In general, the comparison between pairs of kinematic or kinetic curves is performed by computing the Pearson correlation coefficient ( ), which allows for quantifying the strength of a linear relationship between the two curves (i.e., their shape similarity, independently from their amplitude or their mean difference) [2,13], the root mean square error (RMSE) which provides a positive global index [2], or the coefficient of multiple correlation (CMC) which is helpful when the reliability of a group of curves is under analysis [14,15].
Another simple approach consists in computing the difference between parameters assumed to be representative of the entire curve, such as the range of motion (ROM), or computing the mean difference between the mean values of the curve under analysis ( ) in respect of the mean value of the reference curve ( ref ). Some indices were proposed to compare the ROM of the two curves in order to quantify the differences in terms of pattern amplitude, such as the ratio index (RI ROM = ROM Pa /ROM Pref ) [16] or the symmetry angle [17]. Conversely, the mean difference (MD = − ref ) is used to assess a vertical shift (offset) between the curve under analysis and the curve used as reference [2]. More complex methods have also been suggested, including extended indices [18], Fourier analysis [19], principal component analysis [20], eigenvectors [21], fractal methods [22], neural networks [23], pattern recognition techniques [24], or ninth order polynomial fitting [25].
Another approach commonly adopted in gait analysis consists in calculating the differences between the curves in correspondence of specific gait events (e.g., at foot contact or at foot off). However, for each curve several points can be extracted and their selection could be arbitrary, and it implies a loss of information about the entire pattern and hence it can be critical.
Finally, it is possible to combine the above described approaches, such as in the study of Crenshaw and Richards [21], who suggested to compute five parameters three of which based on eigenvectors computation, and the other two being MD and RI ROM .
There is hence a large amount of research in the field, but the multiplicity of proposed methods suggests that a simple approach to perform a global comparison between gait curves through a few parameters with specific physiological meaning is still lacking. The aim of this study is to present and validate a simple method based on linear fitting applied to two datasets plotted one versus the other (linear fit method, LFM). This method was preliminary suggested by our group [26] and then, despite not being validated yet, applied for comparing gait data obtained in different laboratories [27]. Presented here is the validation of LFM, carried out in terms of appropriateness, sensitivity, specificity, and reliability.

Analytical Description of the Linear Fit Method.
Let be the kinematic (or kinetic) dataset under investigation that should be compared with ref , that is, the reference dataset (as shown in the left plot of Figure 1). As usual in GA, the datasets are time-normalized between two selected events, such as two consecutive foot-strikes of the same limb which define the gait cycle [28]. Since and ref are normalized in respect of gait cycle, they result in two arrays of real numbers of the same length. It is hence possible to plot against ref , to define a set of points in a Cartesian coordinate system (( ; ) with = 1 . . . ) where ref values correspond to -values and to -values ( Figure 1). The present method is based on applying a linear fit to this set of points. This fitting minimizes, in a least squares sense, the sum of the square vertical distances between the points and the fitting line (regression line, right plot of Figure 1): where represents the linear function which approximates values by means of a linear transformation of values of ref ; 1 is the angular coefficient; and 0 is the intercept of the fitting line. The goodness of the fit can be easily assessed by the coefficient of determination 2 which coincides with, for the properties of linear fit, the square of the Pearson's correlation coefficient .
The LFM relies on the interpretation of the values of 2 , 0 , and 1 for assessing curve similarity between and ref .
The formulas for computing the above three parameters are with the length of datasets (corresponding to the 100% of gait cycle) and overline used for indicating the mean value of a dataset. The meaning of LFM parameters is described below.
(i) 1 measures the mean variation of for every oneunit change in ref . It hence represents the amplitude scaling factor, that is, the factor for which ref should be multiplied to match except for a scalar addition.
(ii) 0 predicts this scalar addition (shift), that is, the value of when ref is equal to 0.
(iii) 2 measures the strength of the linear relationship between and ref , that is, the percentage of variance in that can be matched by the variance in ref .
It should be noted that if = ref then the values of LFM parameters are 1 = 1, 0 = 0, 2 = 1. Further, the LFM has the advantage that, for its intrinsic linearity, the mean 1and 0 -values obtained from comparisons of differentdata sets with their mean pattern are equal to the ideal values: 1 = 1 and 0 = 0. This is the case when curves of healthy subjects are compared with a reference pattern obtained as their mean.

LFM Validation.
To describe the application and the advantages of LFM in comparison with other parameters commonly used in GA, we first analyzed synthetic datasets generated from a real reference pattern (a physiological knee sagittal kinematics) in which mathematical transformations were applied in order to simulate specific gait pattern alterations. Synthetic data were used to allow for perfectly knowing the mathematical difference between and ref .
LFM was then validated using real data in terms of (a) appropriateness (does it provide different results for patients when compared to healthy subjects?), (b) sensitivity (does it detect a specific difference in the curves?), (c) specificity (is it able to detect as pathological only actually pathological patterns?), and (d) reliability (can the measures be repeated accurately?).
In particular, to test the capacity of LFM to detect a difference when it is present, we have applied it on five different synthetic arrays of data ( , i from 1 to 4) obtained by altering the mean knee sagittal kinematics ( ) obtained from 15 healthy subjects acquired by means of a stereophotogrammetric system during level walking. The mathematical reshape of these reference data allowed for examining the variation of LFM parameters when one (or more) specific feature of the curve was selectively altered in order to simulate a specific knee impairment ( 1 : hyperextended knee, 2 : knee with reduced mobility, 3 : stiff knee, 4 : hyperflexed knee). For these curves, values of the three parameters obtained using LFM were compared with the values of three parameters commonly used in literature: RI ROM , MD, and RMSE.
To assess the LFM appropriateness, the data relative to the sagittal kinematics of hip, knee and ankle of 15 healthy subjects were compared with those of 34 patients affected by cerebrovascular accident (CVA). The values of LFM parameters obtained for the two groups were hence compared by means of unpaired 2-tailed -tests. For this and all the other statistical tests applied in the present study the threshold for statistical significance was set at 0.05.
Relevant mean, standard deviation, and 95% confidence interval (IC 95% ) for each set of data were also computed.
LFM sensitivity and specificity were assessed performing a Wilks' lambda discriminant analysis computed on the above described real data. This analysis was performed to assess the capacity of LFM to cluster the subjects into two groups: healthy group and patient group.
The reliability of LFM was evaluated by computing the intraclass correlation coefficient (ICC (2, 1)) for hip, knee, and ankle sagittal kinematics.
Gait datasets were acquired using a 9-camera motion capture system (Smart-D system, BTS Bioengineering, Milan, Italy) to reconstruct the 3D position of 21 retroreflective spherical markers located on the subjects skin according to the conventional method [29], during level walking in barefoot conditions at self-selected speed. Datasets were related to three trials per side for each one of fifteen healthy subjects and six trials of affected side for each one of the 34 patients with CVA.

Comparison of LFM Parameters to Other Parameters on
Synthetic Data. Figure 2 shows four synthetic reproductions of knee impairment, and Table 2 reported the relevant mathematical equations applied to obtain these data, together with the values of computed parameters. The values obtained for RI ROM , MD, and RMSE were misleading and less meaningful in respect of the values of LFM parameters. In detail, the analysis performed on the synthetic datasets 2 and 3 highlighted that when the offset between curves is evaluated using MD, its value is influenced by the amplitude differences (Table 1) Gait cycle (%)   3 , 4 ), despite that the differences were due to an offset in 1 , to a combination of offset and amplitude differences in Y 3 or to shape dissimilarity in 4 . In this last case, the mathematical transformation was not linear, but the value of 2 remained high, and the waveform differences were better quantified by parameters of LFM than by RI ROM , MD, and RMSE.

Appropriateness.
LFM has been applied to analyze the sagittal kinematics of healthy subjects (walking at 68 ± 10% of their stature/s) and of patients with CVA (walking at 42 ± 15%, < 0.001). Mean, standard deviation, and confidence interval of the sagittal hip, knee, and ankle kinematics of the healthy subjects group were reported in Table 2. For healthy subjects, the mean 1 and 0 resulted to be equal to ideal values 1 and 0, respectively, whereas the mean 2 was just close to its ideal value for hip (0.99), knee (0.97), and ankle (0.89) joint (in mean 0.95). The statistical analysis reported in Table 2 showed that the values of the LFM parameters resulted to be statistically different between patients and healthy subjects. In detail, for patients 2 resulted to be significantly lower at all the three joint levels, the movement amplitude resulted to be significantly reduced for all the three joints ( 1 ≤ 0.70), and the hip resulted to be hyperflexed ( 0 = 6.7 ∘ ).

Discussion
The aim of our study was to present and validate a linear fit method for assessing the similarity between curves relative to gait datasets. This assessment is usually the basis of GA, both for clinical and research purposes.
The results obtained in this study on synthetic data showed that the values with conventionally used parameters, such as MD, RI ROM , and RMSE, can be misleading. Conversely, 0 and 1 , two of the LFM parameters, can be used as representative of offset and amplitude difference, respectively, without the following problems affecting the values of MD and RI ROM . For example MD, which is generally adopted to assess the presence of a vertical shift, can be potentially affected by changes in amplitude (as evident for 2 and 3 ). The problem of vertical shift is particularly important, for example, when tests were repeated and GA-markers need to be replaced (potentially introducing an offset): this shift is the most important factor in reducing the reliability of repeated measures and it should be properly assessed [27,30]. On the other hand, the use of ROM (and hence RI ROM and other related indices) can have some disadvantages: (1) it only compares the differences between the maximum and the minimum of the curves, independently from the data distribution; (2) the mean ROM of curves can be very different from the ROM of the relevant mean curve, and it can affect the assessment of amplitude similarity. The recovery of a functional ROM is an important outcome measure in rehabilitation. Differently from ROM, 1 takes into account the amplitude of the gait pattern in respect of the physiological pattern along the entire gait cycle. The RMSE has the problem that its values were similar over the different conditions (such as synthetic data 1 , 3 , 4 ) and hence its physiological meaning is difficult to be argued. More clear is the meaning of Pearson correlation coefficient (despite being improperly used in many studies as an indicator of agreement of two datasets) [31,32]. However the same information obtained with can be obtained in LFM by the 2 value, which provides a measure of the shape similarity of two curves with a clear mathematical meaning (the percentage of variance of the dataset under analysis explained by a linear transformation of the reference dataset) and a clear physiological meaning (the pattern similarity despite possible amplitude differences or presence of a shift). 2 resulted in an index for summarising the waveform similarity, and it can potentially quantify the efficacy of a treatment in relationship to functional and structural recovery as indicated by ICF [33].
The LFM have some advantages clearly reported and that could be summarised as follows: (1) LFM takes into account all data point distributions (resulting in less dependence on single peak-values than ROM and other similar parameters); (2) LFM is simple to be applied; (3) this simplicity implies a clear meaning of its few (three) parameters; (4) its linearity implies that mean parameter values of 0 and 1 are equivalent to parameter values of the mean curve; (5) this linearity also allows for using powerful parametric statistics; (6) because 1 , 0 , and 2 were computed at the same time, they independently assess curve differences in terms of amplitude, offset, and similarity, respectively.
We have validated the LFM on kinematic data, but this validation is clearly extensible to kinetic or even electromyographic data because they are all usually time normalized and reported in terms of gait cycle. Our validation showed LFM is appropriate to discriminate between patients and healthy subjects, showing a good sensitivity in identifying pathological gaits and a good specificity (only one false classification out of 15 in the pathological cluster definition). The reliability of LFM parameters was found high, especially for patients and even for the ankle which was characterized by low 2 values. The lower ICC found for healthy subjects is not surprising. In fact, in healthy populations the intersubjects variability is similar to intrasubject variability, resulting in a low ratio between intra-and intersubject variability, as it was already highlighted [10].
In this study, we compared datasets obtained using a stereophotogrammetric system, according to the conventional gait analysis. In the last decade, alternative approaches have been developed based on the use of wearable sensors (including accelerometers, gyroscopes, and magnetic units) [2,[34][35][36][37]. In this study, we did not test datasets obtained using these devices; however, it is conceivably that LFM could be useful for comparing the results of these new approaches with those obtained with the conventional gold standard (i.e., the stereophotogrammetric system).
The proposed LFM have some limitations which should be considered and which can bound its fields of application: (1) the values of 0 and 1 lose meaning when the linear relationship between and ref is poor (low value of 2 ); (2) there is the need for identifying one of the two dataset as the reference one ( ref ); (3) a bias can be introduced by the presence of a phase shift. First, LFM relies on the hypothesis that two gait patterns related to a specific joint are usually characterized by a similar waveform, given the intrinsic biomechanical constraints of the musculoskeletal system. In this respect, it is necessary to define when the hypothesis of linear relationship decays. Despite 2 being high even for nonlinear transformations, such as in synthetic data 4 or for hip and knee joints in real data, it should be taken into account that for 2 < 0.50 (i.e., less than 50% of variance matched by ref variance, corresponding to a < 0.70) the relationship between and ref can be only partially described by means of a linear transformation and hence the values of 1 and 0 should be carefully handled. Second, the results of LFM depend on which dataset, between and ref , is chosen as reference. This problem is common also to other methods. For LFM, the optimization of the fitting is determined by minimizing vertical distances between points obtained from plotting versus ref and fitting a line (see Figure 1). This characteristic may represent a potential limitation of the method, although the existence of a clearly defined ref is a common circumstance in most clinical applications (e.g., in comparing the pathological gait patterns to normative data). However, when the reference data set chosen is questionable, such as symmetry assessment in healthy subjects [17], LFM could still be used, but for applying a fit minimizing the orthogonal distances between points and fitting a line. Finally, we would highlight that when a phase shift between and ref is present (i.e., a shift along the horizontal gait cycle axis), this results in a reduction of shape similarity. Since gait curves are usually time normalized and expressed as a percent of the gait cycle this aspect should not be critical in most of the cases, but if a phase shift is present we suggest to previously perform a cross-correlation for quantifying the horizontal shift and then apply the LFM to the realigned curves.
In conclusion, the strengths and attractiveness of the proposed linear fit method are its easy mathematical implementation, the use of a few parameters, their straightforward physical interpretation, and their evident clinical meaning.