## 2 Materials and Methods
### Regularized Canonical Correlation Analysis (RCCA)  
Canonical correlation analysis (CCA) is the multivariate extension of linear correlation analysis that has been described by [PERSON] [17]. The main purpose of CCA is the exploration of sample correlations between two sets of variables whose roles in the analysis are strictly symmetric and are observed on the same individual. The CCA is currently used in some disciplines such as ecology [18; 19], biology [20; 21], hydrology [22; 23], and health [16].  
In this study, the CCA is performed to investigate the relationships between two sets of variables, namely the kinematic \(\mathbf{X}\) and clinical \(\mathbf{Y}\) datasets, measured on the same individuals.  
Let \(\mathbf{X}\big{(}X_{1},X_{2},\ldots,X_{p}\big{)}\) and \(\mathbf{Y}\big{(}Y_{1},Y_{2},\ldots,Y_{q}\big{)}\) be two matrices of standardized variables (centered and reduced) of order \(n\times p\) and \(n\times q\), respectively. Where \(n=143\) OA patients, \(p=69\) kinematic variables and \(q=42\) clinical variables. The CCA consists in finding in stepwise optimization problem two vectors \(\mathbf{A_{s}}\) and \(\mathbf{B_{s}}\), for \(s=1,\ldots,min(p,q)\), that maximize the correlations between the linear combinations:  
\[\mathbf{U_{s}}=a_{1}^{s}X_{1}+a_{2}^{s}X_{2}+\ldots+a_{p}^{s}X_{p}=\mathbf{X}\mathbf{A_{s}} \tag{1}\]  
\[\mathbf{V_{s}}=b_{1}^{s}Y_{1}+b_{2}^{s}Y_{2}+\ldots+b_{q}^{s}Y_{q}=\mathbf{Y}\mathbf{B_{s}} \tag{2}\]  
assuming that vectors \(A_{s}\) and \(B_{s}\) are normalized so that \(\text{var}(U_{s})=\text{var}(V_{s})=1\).  
In other words, the problem consists in solving  
\[\rho_{s}=\mathbf{cor}(\mathbf{U_{s}},\mathbf{V_{s}})=\max_{\mathbf{A_{s}},\mathbf{B_{s}}}\mathbf{cor}( \mathbf{X}\mathbf{A_{s}},\mathbf{Y}\mathbf{B_{s}}) \tag{3}\]  
subject to \(\text{var}(\mathbf{X}\mathbf{A_{s}})=\text{var}(\mathbf{Y}\mathbf{B_{s}})=1\) and the restriction that \(cor(\mathbf{U_{t}},\mathbf{U_{s}})=cor(\mathbf{V_{t}},\mathbf{V_{s}})=0\) for \(1\leq t<s\). \(\rho_{s}\) is called the canonical correlation, \(\mathbf{U_{s}}\) and \(\mathbf{V_{s}}\) (\(\mathbf{U_{t}}\) and \(\mathbf{V_{t}}\), respectively), are known as the canonical variate vectors. The coefficient vectors \(\mathbf{A_{s}}\) and \(\mathbf{B_{s}}\) are known as the canonical weights (or loadings), canonical vectors, or canonical coefficients. The [PERSON]'s trace test is used for the statistical significance of the canonical correlation model [24; 25].  
The CCA may suffer from instability. Indeed, when the variable related to a data set are highly correlated (nearly collinear), the sample correlation matrix tends to be ill-conditioned and its inverse unreliable. In that case, a regularized approach of CCA (RCCA) solves the instability of the loadings due to multicollinearity by adding a regularization term on the diagonal of the ill-conditionned matrices, i.e., the covariance matrices [20]. A regularization step in the computations of classical CCA consists in the regularization of the covariance matrices \(S_{XX}\) and \(S_{YY}\) of \(\mathbf{X}\) and \(\mathbf{Y}\), respectively, by adding a multiple number of the corresponding identity matrices:  
\[S_{XX}(\lambda_{1})=\ S_{XX}\ +\ \lambda_{1}I_{p} \tag{4}\]  
\[S_{YY}(\lambda_{2})\ =\ S_{YY}+\ \lambda_{2}I_{q} \tag{5}\]  
where \(\lambda_{1}\) and \(\lambda_{2}\) are non-negative numbers (also called regularization terms) imposed to the diagonal of the covariance matrices such that \(S_{XX}(\lambda_{1})\) and \(S_{YY}(\lambda_{1})\) becomes regularized and nonsingular [20]. The regularization terms, \(\lambda_{1}\) and \(\lambda_{2}\), associated to each dataset are chosen by cross-validation in order to maximize the first canonical correlation.