wcc {wccsom}R Documentation

Agreement between patterns including peak shifts

Description

Weighted cross correlation and autocorrelation, as described in De Gelder et al. (2001), for assessing similarities in spectra-like data containing peak shifts. Euclidean distances are useless in this situation.

Usage

wcc(pattern1, pattern2, trwdth, wghts, acors)
wac(pattern1, trwdth, wghts)
wacmat(tpatterns, trwdth, wghts)

Arguments

pattern1 Pattern.
pattern2 Another pattern.
tpatterns Transposed pattern matrix: columns correspond with patterns.
trwdth Triangle width, given in the number of data points.
wghts Optional weights vector, will be calculated from triangle width if necessary. Sometimes it is more efficient to pre-calculate it and give it as an argument.
acors Autocorrelation, also optional to speed up calculations.

Value

Function wcc returns the WCC value, a similarity value between 0 and 1. Functions wac and wacmat return weighted autocorrelations for one pattern and a matrix of patterns, respectively.

Author(s)

Ron Wehrens

References

R. de Gelder, R. Wehrens, and J.A. Hageman. A generalized expression for the similarity spectra: application to powder diffraction pattern classification. J. Comput. Chem., 22(3), 273-289, 2001.

See Also

WCCSOM

Examples

data(cepha)
wac(cepha$patterns[1,], 20)
wacmat(t(cepha$patterns), 20)
wcc(cepha$patterns[1,], cepha$patterns[2,], 20)

[Package wccsom version 1.1.0 Index]