## 2 Methods
### Statistical Analysis
#### 2.5.1 Pre-Processing of Data  
Data from SurveyMonkey.com were downloaded and exported into Microsoft Excel (Microsoft Inc., Redmond, WA, USA), where mood data were scored. Gait and postural data were exported as h5 files from the APDM software into Python where means and variation were calculated for each gait parameter. For upper and lower extremity variables mean and standard deviation for each limb were calculated and mean measure for each extremity limb variables (i.e., mean gait speed) and imbalance between each extremity limb (i.e., variation in gait speed between legs) were also calculated. The following formulas were used:  
Mean for each gait parameter (i.e., turn velocity)  
\[\left(\textit{mean turn velocity}=\frac{\textit{sum of velocity of all turns}}{\textit{number of turns}}\right)\]  
Variation for each gait parameter (i.e., standard deviation in turn velocity)  
\[\left(\textit{variation in turn velocity}=\sqrt{\frac{\sum_{i=1}^{i= number of turns}\left(\textit{turn velocity}-\textit{mean turn velocity}\right)^{2}}{\textit{Number of turns}}}\right)\]  
Mean gait parameter for individual limb (i.e., mean gait speed for right leg only)  
\[\left(\textit{mean gait speed right leg}=\frac{\textit{sum of gait speed of right leg during 2-minute walk}}{\textit{number of steps taken by right leg in 2-minute walk}}\right)\]  
Variation in movement for each individual limb (i.e., standard deviation for right leg gait speed only/intra-limb variation in movement)  
\[\left(\textit{variation in right leg gait speed}=\sqrt{\frac{\sum_{i=1}^{i= number of steps on right leg}(\textit{right leg gait speed}-\textit{mean right leg gait speed})^{2}}{\textit{Number of steps on right leg}}}\right.\]Mean gait parameter for both limbs of upper and lower extremity (i.e., mean gait speed)  
\[Mean\ gait\ speed=\frac{\sum(gait\ speed\ right\ leg+gait\ speed\ left\ leg)}{Total\ number\ of\ steps}\]  
Imbalance in gait parameters between limbs (i.e., variation in gait speed between limbs/inter-limb variation in movement) to assess for consistency of movement and synchronization of movement on both sides [45; 46].  
Imbalance in gait speed between \(limb=\sum\frac{gait\ speed\ right\ leg-gait\ speed\ left\ leg}{gait\ speed\ right\ leg+gait\ speed\ left\ leg}/Total\ number\ of\ steps\)  
After calculation of gait parameters, data of all gait variables were merged with the calculated mood data.  
Data were then further pre-processed for training. There were 314 missing values distributed across 23 variables (total 3312 values). To fill in missing values, Nearest Neighbor Imputer (NNImputer) with a 5 neighbor imputer was used to replace missing values [47]. The NNImputer, 5 neighbor imputer techniques involve taking the mean of the neighboring 5 values on both sides of the data and replacing the missing value with that mean [47]. Data were then screened for outliers and winsorized to mitigate the influence of extreme values [48]. Winsorization involves taking extreme values and replacing them with the value that corresponds with a certain percentile of the original distribution. All gait variables in this study were rescaled to recode values past the 95 th percentile to the value of the 95 th percentile [48].