Partial-Least-Squares – To Mean Center or Not in Partial Least Squares Regression

centeringchemometricspartial least squaresregression

In my current project, I'm using PLS regression on infrared spectra (FTIR). For this I'm using R and the pls function from the plsr package. pls always mean centers both the input data and the infrared spectra. When predicting using a fitted PLS model, the means fitted during the estimation process will be subtracted from the data.

In one particular situation this is not a desirable effect for me, as the mean for each of the IR wavenumbers is not constant between measurements. This is caused by the fact that the path length of the beam which goes through the sample can change, either because a particular machine has a different path length than the machine used for fitting the model, or because the path length slowly changes over time because of wear and tear in the measuring cell.

By not mean centering the data, the means end up the first PLS factor. This allows a linear scaling of the mean, taking into account linear effects such as the cell path length. This makes the model more robust in particular situations. I am aware that we could correct the IR spectra first, and then use the fitted means. But, we would like to put this inside the fitted model.

I sent an e-mail to the maintainer of the PLSR package about why the package did not support switching off mean centering. The reply was:

No, that is not possible. Theoretically, if one does not center, it is not PLSR.

Other tools used in the field of spectroscopy (Grams, Unscrambler) do allow switching off mean centering. And in the situation above I feel that disabling mean centering has a big advantage.

Now for my concrete question:

Is PLS without mean centering still PLS, are there any theoretical or practical reasons not to do this?

Best Answer

There are mainly two algorithms for PLSR namely NIPALS and SIMPLS.

SIMPLS algorithm is generally faster yet numerically less stable(in most cases the difference is very small). The original article of SIMPLS provides the steps which starts with mean centering both X and Y. The maintainer of the package probably relies on these steps. However, directly quoting from the article:

enter image description here

With NIPALS algorithm, in this very essential article the authors mentions the mean centering is done by default to make the calculations easier and provided no other specific information.

Lastly, there is this article which directly questions the reasoning behind mean centering and provides some case studies. The authors stated exactly what you have observed. In some cases mean-centering can even decrease the predictive ability of the model. While it allows easy calculation of intercept term, I believe it is safe to omit centering.

Since all algorithms basically carries out eigenvalue decomposition of covariance matrices that involves distance of variables from their means, it is still called PLS without mean-centering. However, that requires alteration of your code.

The options in the softwares you have mentioned may allow you to skip centering but these options may be available for the data that is already centered. In other words they might be still using

X' * Y

instead of

(X - mean(x))' * (Y - mean(Y))

for the calculation of covariance matrix, for instance.

The articles:

SIMPLS: De Jong, Sijmen. "SIMPLS: an alternative approach to partial least squares regression." Chemometrics and intelligent laboratory systems 18, no. 3 (1993): 251-263. Harvard

PLS tutorial with NIPALS: Geladi, Paul, and Bruce R. Kowalski. "Partial least-squares regression: a tutorial." Analytica chimica acta 185 (1986): 1-17.

Mean-centering in PLS: Seasholtz, Mary Beth, and Bruce R. Kowalski. "The effect of mean centering on prediction in multivariate calibration." Journal of Chemometrics 6, no. 2 (1992): 103-111. Harvard

Related Question