PRTools Contents

PRTools User Guide

pls_train

PLS_TRAIN

Partial Least Squares (training)

    [B,XRes,YRes,Options] = pls_train(X,Y)
    [B,XRes,YRes,Options] = pls_train(X,Y,Options)

  INPUT
   X [N -by- d_X] the training (input) data matrix, N samples, d_X variables
   Y [N -by- d_Y] the training (output) data matrix, N samples, d_Y variables

    Options.
    maxLV maximal number of latent variables (will be corrected
                 if > rank(X));
                 maxLV=inf means maxLV=min(N,d_X) -- theoretical maximum
                 number of LV;
                 by default =inf
    method 'NIPALS' or 'SIMPLS'; by default ='SIMPLS'

    X_centering do nothing (=[] or 0), do mean centering (=nan), center
                 around some vaue v (=v);
                 by default =[]
    Y_centering do nothing (=[] or 0), do mean centering (=nan), center
                 around some vaue v (=v);
                 by default =[]
    X_scaling do nothing (=[] or 1), divide each col by std (=nan),
                 divide by some v (=v);
                 by default =[]
    Y_scaling do nothing (=[] or 1), divide each col by std (=nan),
                 divide by some v (=v);
                 by default =[]

Output
 B [d_X -by- d_Y -by- nLV] collection of regression matrices:  Y_new = X_new*B(:,:,n) represents regression on the first n  latent variables (X_new here after preprocessing, Y_new before  un-preprocessing)  XRes.  ssq [1 -by- nLV] the part of explaind sum of squares of  (preprocessed) X matrix
 T [N -by- nLV] scores (transformed (preprocessed) X)
 R [d_X -by- nLV] weights (transformation matrix)
 P [d_X -by- nLV] loadings (back-transformation matrix)  P(:,k) are the regression coef of  (preprocessed) X on T(:,k)
 W [d_X -by- nLV] local weights (local transformation matrix);
 ONLY FOR NIPALS
 V [d_X -by- nLV] first k columns of this matrix are the  orthornormal basis of the space spanned by k  first columns of P; ONLY FOR SIMPLS YRes.  ssq [1 -by- nLV] the part of explained sum of squares of  (preprocessed) Y matrix
 U [N -by- nLV] scores (transformed (preprocessed) Y)
 Q [d_Y -by- nLV] weights (transformation matrix)
 C [d_Y -by- nLV] C(:,k) are the regression coeff of  (preprocessed) Y on T(:,k)  bin [1 -by- nLV] bin(k) is the regression coeff of U(:,k) on T(:,k)
  Options. contains the same fields as in input, but the values can be changed  (e.g. after mean centering X_centering = mean(X,1))

Description

Trains PLS (Partial Least Squares) regression model

Relations between matrices (X end Y are assumed to be preprocessed)
NIPALS
T = X*R (columns of T are orthogonal)  R = W*prinv(P'*W) P = X'*T*prinv(T'*T) U = Y*Q - T*(C'*Q-tril(C'*Q)) C = Y'*T*prinv(T'*T) = Q*diag(bin)  bin = sqrt(diag(T'*Y*Y'*T))'*prinv(T'*T)) B = R*C' = W*prinv(P'*W)*C'

SIMPLS
T = X*R (columns of T are orthonormal)  P = X'*T U = Y*Q C = Y'*T = Q*diag(bin)  bin = sqrt(diag(T'*Y*Y'*T))' B = R*C'

BOTH
T_new = X_new*R  Y_new = X_new*B

See also

pls_apply, pls_transform,

PRTools Contents

PRTools User Guide

This file has been automatically generated. If badly readable, use the help-command in Matlab.