Skip to contents

This function implements three orthogonal signal correction (OSC) algorithms, which are a class of preprocessing techniques designed to minimize, in a set of spectral data, the systematic variability or noise not directly related to or correlated with the response vector or property of interest.

Usage

osc(
  x,
  y,
  method = "sjoblom",
  center = TRUE,
  scale = FALSE,
  ncomp = 10,
  tol = 0.001,
  max.iter = 10
)

Arguments

x

A matrix or data frame of the predictor variables.

y

A vector of the response variable.

method

A character string indicating the OSC method to use. Accepted values are "wold", "sjoblom" and "fearn". Default is "sjoblom".

center

A logical value indicating whether to mean-centered x and y. Default is TRUE.

scale

A logical value indicating whether to scale x and y. Default is FALSE.

ncomp

An integer representing the number of components, which defines how many times the entire process will be performed. Default value is 10.

tol

A numeric value representing the tolerance for convergence. The default value is 1e-3.

max.iter

An integer representing the maximum number of iterations. The default value is 10.

Value

An list containing the following components:

  • correction: The corrected matrix.

  • scores: The orthogonal scores matrix.

  • loadings: The orthogonal loadings matrix.

  • weights: The orthogonal weights matrix.

  • R2: The value of the explained variance.

  • angle: The value of the orthogonalization angle.

Details

The OSC algorithm identifies and removes the orthogonal variation in the input spectral matrix, \(\textbf{X}\), by iteratively deflating \(\textbf{X}\) with respect to the response vector \(\textbf{y}\). The resulting \(\textbf{X}\)-matrix contains only the variation that is relevant to the \(\textbf{y}\)-vector, which can then be used for further modeling or analysis. This function implements three different methods for OSC: the original method proposed by Wold et al. (1998), the method proposed by Sjöblom et al. (1998), and the method proposed by Fearn (2000).

References

  • Sjöblom, J., Svensson, O., Josefson, M., Kullberg, H., Wold, S., (1998). An evaluation of orthogonal signal correction applied to calibration transfer of near infrared spectra. Chemometrics Intell. Lab. Syst., 44(1):229-244.

  • Fearn, T., (2000). On orthogonal signal correction. Chemometrics Intell. Lab. Syst., 50(1):47-52.

  • Wold, S., Antti, H., Lindgren, F., Ohman, J. (1998). Orthogonal signal correction of near-infrared spectra. Chemometrics Intell. Lab. Syst., 44(1):175-185.

  • Svensson, O., Kourti, T. and MacGregor, J.F., (2002). An investigation of orthogonal correction algorithms and their characteristics. Journal of Chemometrics, 16(1):176-188.

Author

Christian L. Goueguel