honigs {prospectr}R Documentation

Honigs algorithm for calibration sampling

Description

Select calibration samples from a data matrix or data.frame using the Honings et al. (1985) method

Usage

honigs(X,k,type)

Arguments

X

numeric data.frame or matrix with absorbance or continuum-removed reflectance values

k

number of samples to select for calibration

type

type of data: 'A' for absorbance (default), 'R' for reflectance, 'CR' for continuum-removed reflectance

Details

The Honigs algorithm is a simple method to select calibration samples based on their absorption features. Absorbance, reflectance and continuum-removed reflectance values (see continuumRemoval) can be used (type argument). The algorithm can be described as follows: let A be a matrix of (i \times j) absorbance values:

  1. the observation (row) with the maximum absolute absorbance (max(|A|)) is selected and assigned to the calibration set.

  2. a vector of weights W is computed as A_j/max_A where A_j is the column of A having the maximum absolute absorbance and max_A is the absorbance value corresponding to the maximum absolute absorbance of A.

  3. each row A_i is multiplied by the corresponding weight W_i and the resulting vector is substracted from the original row A_i.

  4. the row of the selected observation and the column with the maximum absolute absorbance is removed from the matrix

  5. go back to step 1 and repeat the procedure until the desired number of selected samples is reached

The observation with the maximum absorbance is considered to have an unusual composition. The algorithm selects therefore this observation and remove from other samples the selected absorption feature by substraction. Samples with low concentration related to this absorption will then have large negative absorption after the substraction step and hence will be likely to be selected rapidly by the selection procedure as well.

Value

a list with components:

Note

The selection procedure is sensitive to noisy features in the signal. The number of samples selected k selected by the algorithm cannot be greater than the number of wavelengths.

Author(s)

Antoine Stevens

References

Honigs D.E., Hieftje, G.M., Mark, H.L. and Hirschfeld, T.B. 1985. Unique-sample selection via Near-Infrared spectral substraction. Analytical Chemistry, 57, 2299-2303

See Also

kenStone, naes, duplex, shenkWest

Examples

data(NIRsoil)
sel <- honigs(NIRsoil$spc,k=10,type='A')
wav <- as.numeric(colnames(NIRsoil$spc))
# spectral library
matplot(wav,t(NIRsoil$spc),type='l',xlab='wavelength /nm',ylab='Abs',col='grey50')
# plot calibration spectra
matlines(wav,t(NIRsoil$spc[sel$model,]),type='l',xlab='wavelength /nm',ylab='Abs',lwd=2,lty=1)
# add bands used during the selection process
abline(v=wav[sel$bands])

[Package prospectr version 0.1.3 Index]