# Walking-Age Estimator Based on Gait Parameters Using Kernel Regression
## 2 Methods
### Kernel Regression Analysis  
Kernel regression analysis, a type of nonlinear regression, is employed to estimate age. Given that the explanatory variables (gait parameters) and the target variable (age) are not expected to have a simple linear correlation, a nonlinear approach was selected. Among nonlinear machine learning methods, kernel regression is particularly well-suited to our objectives and constraints; it can be applied to datasets of moderate size and is designed for continuous value estimation rather than classification. That said, the aim of this study is not to compare various machine learning algorithms, and kernel regression is not intended to be the exclusive solution.  
In kernel regression analysis, the objective variable is expressed as a linear combination of kernel functions. The regression coefficients are determined by minimizing the squared error between the observed and estimated values of the objective variable. In this study, we estimated the ages of individuals in the database using Gaussian kernels, with height, weight, and gait parameters as explanatory variables. The Gaussian kernel is one of the most commonly used kernel functions and is generally employed unless there is a specific reason to choose an alternative.  
The kernel function expresses the similarity between two explanatory vectors, \(\mathbf{x}\) and \(\mathbf{x}^{\prime}\), and is computed as follows:  
\[k(\mathbf{x},\mathbf{x}^{\prime})=\exp{(-\beta\|\mathbf{x}-\mathbf{x}^{\prime}\|^{2})}, \tag{1}\]  
where \(||\bullet||\) is L2 norm. Here, \(\mathbf{x}\) and \(\mathbf{x}^{\prime}\) denote the gait parameters and the weight and height of participants for two specific samples. This function measures the similarity between two ensembles of explanatory variables, which leads to a substantial difference from multiple linear-regression analyses that can examine the effect of each variable independently. Let \(n\) be the number of samples in the training dataset; the Gram matrix is computed by  
Figure 4: Minimum foot clearance. Distance between the sole and ground when the swinging foot is parallel to the ground.  
\[\mathbf{K}=\begin{pmatrix}k(\mathbf{x}^{(1)},\mathbf{x}^{(1)})&\ldots&k(\mathbf{x}^{(n)},\mathbf{x}^{(1 )})\\ \vdots&\ddots&\vdots\\ k(\mathbf{x}^{(1)},\mathbf{x}^{(n)})&\ldots&k(\mathbf{x}^{(n)},\mathbf{x}^{(n)})\end{pmatrix}, \tag{2}\]  
where \(\mathbf{x}^{(j)}\) is the vector of explanatory variables for sample \(j\). The value of the objective variable \(y\) corresponding to any sample \(\mathbf{x}\) in the training dataset is estimated by  
\[\hat{y}=\sum_{j=1}^{n}\alpha_{j}k(\mathbf{x}^{(j)},\mathbf{x}), \tag{3}\]  
where \(y\) is represented by a linear sum of kernel functions and \(\alpha_{j}\) is their weight. The squared error between the observed and estimated values for a sample \((x,y)\) is  
\[r_{k}(y,\mathbf{x};\mathbf{\alpha}) = (y-\hat{y})^{2} \tag{4}\] \[= (y-\sum_{j=1}^{n}\alpha_{j}k(\mathbf{x}^{(j)},\mathbf{x}))^{2}.\]  
\(\mathbf{\alpha}=(\alpha_{1},\ldots,\alpha_{n})^{\mathrm{T}}\) is determined to minimize the sum of squared errors among all samples in the training dataset. When \(\mathbf{y}=(y_{1},\ldots,y_{n})^{\mathrm{T}}\), the sum of squared errors is  
\[R_{k}(\mathbf{\alpha})=(\mathbf{y}-\mathbf{K}\mathbf{\alpha})^{\mathrm{T}}(\mathbf{y}-\mathbf{K}\mathbf{ \alpha}). \tag{5}\]  
The least-squares solution of \(\mathbf{\alpha}\) is  
\[\mathbf{\alpha}=\mathbf{K}^{-1}\mathbf{y}. \tag{6}\]  
Typically, kernel regression analysis regularizes the Gram matrix to improve its generalization ability for untrained data. The sum of squared errors after regularization is computed as follows:  
\[R_{k\lambda}(\mathbf{\alpha})=(\mathbf{y}-\mathbf{K}\mathbf{\alpha})^{\mathrm{T}}(\mathbf{y}-\mathbf{ K}\mathbf{\alpha})+\lambda\mathbf{\alpha}^{\mathrm{T}}\mathbf{K}\mathbf{\alpha}, \tag{7}\]  
where \(\lambda\) (\(\lambda>0\)) is a hyperparameter. For the minimization problem, the derivatives of this function related