Skip to main content


Springer Nature is making SARS-CoV-2 and COVID-19 research free. View research | View latest news | Sign up for updates

Table 1 Pseudo-code for the K-OPLS model training algorithm. K denotes the original kernel matrix, Ki the kernel matrix deflated by i Y-orthogonal components and Qi the Ki matrix deflated by A predictive components.

From: K-OPLS package: Kernel-based orthogonal projections to latent structures for prediction and interpretation in feature space

Step Description
1. Estimate the predictive Y-weights (Cp) by eigen-vector decomposition of YTKY
2. Project Y onto Cp to achieve the predictive score matrix of Y: UpYCp
3. Calculate the predictive score matrix of X: TpKUp
4. Repeat for i : 1 to Ao
  4.1 Estimate the Y-orthogonal loadings co by eigen-vector decomposition of TpTQiTp.
  4.2. Calculate the Y-orthogonal score vector: to,iQiTpco
  4.3. Deflate Ki by to,i, yielding Ki+1
  4.4. Update the predictive score matrix: TpKi+1Up
5. Predictions of Y: YhatT* p (TpTTp)-1TpTUpCpT. For predictions of future samples, T* p originates from the prediction set.