wcc: 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.
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.
do.transpose
Internally, columns should correspond with
patterns, so normally one should leave this value to its default:
TRUE. If a matrix is already in the correct format, one can avoid
unnecessary double transpose operations.
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.
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.