Input: data and parameters ;
Output: optimal number of principal component and rdCV-MO-NPLS model.
for to do
 Split dataset S equally into groups, i.e., ;
for to do
  Select as Test set, and construct Calibration sets  = ;
  Split Calibration set equally into groups, ;
  for to do
   Select as Validation set and as Training set;
   Fit MO-NPLS based on with, respectively, of principal components,
   Apply the MO-NPLS models to and get predictive for ;
   Calculate mean square error , with the number of objects in the used validation set     and the output objects of validation set ;
  Estimate optimum principal components , …, according to based on standard error method [15] (Here, more than   one may be selected (i.e., ) because of different confidence interval);
  Make MO-NPLS models based on Calibration set with ;
  Test fitted models on and obtain a group of k predictions as well as k biases;
  Find the smallest bias and determine the optimal principal component .
 One can get with the number of after completing the outer loop.
Totally, after a complete rdCV run, we can get with the number of (). The final optimum of principal component is the one with highest frequency in .
Identify rdCV-MO-NPLS model with database S and to get model parameters [, p, c, q] based on (3)–(10).
Algorithm 1: rdCV-MO-NPLS.