calculates the tuning parameters of the TOP-Transfer by Orthogonal Projection method, for which the variability is issued from two measurements on the same samples (ex: with two devices)
res=pop_dtop_optim(x,y,xtest1,xtest2,maxdim,lv)
a calibration dataset; x and y are of dimensions (n x q) and (n x 1) respectively; datasets or div structures
two measurements on the same samples; two matrices (n0 x q) or div structures
the max number of dimensions to remove; an integer
the number of latent variables for the PLS regression; an integer
a structure contaning the following fields:
- res.d_matrix: the matrix D = xtest1 - xtest2, of dimensions (n0 x q)
- res.eigenvec: the eigenvectors of D; a matrix (q x n1)
- res.ev_pcent: a vector (n1 x 1)
- res.wilks: the Wilks lambda calculated on D after deflation of 0 to maxdim dimensions; a vector (maxdim+1,1)
- res.rmsecv: the errors of prediction in cross validation; a matrix (lv x (maxdim+1))