osc_sjoblom: Orthogonal Signal Correction (OSC) Approach by Sjoblom et al.

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/mt_osc.R

Description

Orthogonal signal correction (OSC) approach by Sjoblom et al.

Usage

1
2
  osc_sjoblom(x, y, center=TRUE,osc.ncomp=4,pls.ncomp=10,
              tol=1e-3,iter=20,...)

Arguments

x

A numeric data frame or matrix to be pre-processed.

y

A vector or factor specifying the class for each observation.

center

A logical value indicating whether the data set should be centred by column-wise.

osc.ncomp

The number of components to be used in the OSC calculation.

pls.ncomp

The number of components to be used in the PLS calculation.

tol

A scalar value of tolerance for OSC computation.

iter

The number of iteration used in OSC calculation.

...

Arguments passed to or from other methods.

Value

A list containing the following components:

x

A matrix of OSC corrected data set.

R2

R2 statistics. It is calculated as the fraction of variation in X after OSC correction.

angle

An angle used for checking if scores t is orthogonal to y. An angle close to 90 degree means that orthogonality is achieved in the correction process.

w

A matrix of OSC weights.

p

A matrix of OSC loadings.

t

A matrix of OSC scores.

center

A logical value indicating whether the data set has been centred by column-wise.

Author(s)

Wanchang Lin

References

Sjoblom. 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: 229-244.

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

Westerhuis, J. A., de Jong, S., Smilde, A, K. (2001). Direct orthogonal signal correction. Chemometrics Intell. Lab. Syst., 56: 13-25.

See Also

osc, predict.osc, osc_wold, osc_wise

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
data(abr1)
cl   <- factor(abr1$fact$class)
dat  <- abr1$pos

## divide data as training and test data
idx <- sample(1:nrow(dat), round((2/3)*nrow(dat)), replace=FALSE) 

## construct train and test data 
train.dat  <- dat[idx,]
train.t    <- cl[idx]
test.dat   <- dat[-idx,]        
test.t     <- cl[-idx] 

## build OSC model based on the training data
res <- osc_sjoblom(train.dat, train.t)
names(res)

## pre-process test data by OSC
test.dat.1 <- predict.osc(res,test.dat)$x

mt documentation built on Nov. 15, 2021, 9:06 a.m.