Description Usage Arguments Details Value Author(s) References Examples
Functions to calculate weighted auto- and cross-correlation measures. The wcc is a suitable measure for the similarity of two patterns when features may be shifted. Identical patterns lead to a wcc value of 1.
Functions wcc
and wac
are meant for profile data
(intensities measured at equidistant time points), whereas
wcc.st
and wac.st
are meant for peak lists. In general,
wcc values calculated for profiles will be higher since they will also
include the large similarity in the empty spaces, i.e., parts of the
profiles where no peaks are present (and that will appear to be
perfectly aligned), whereas the peak-based version concentrates only
on the peaks.
1 2 |
pattern1, pattern2 |
input patterns, typically spectra. Vectors |
trwdth |
triangle width, given in the number of data points for the profile functions, and in the actual retention times for the stick-based warpings. |
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 |
acors1, acors2 |
autocorrelations of the input patterns. If not provided, they are calculated |
Functions wcc
and wac
are defined such that the
triangle width stands for
the number of points on one side of and including the current
point. Thus, a trwdth
of 0 signifies a non-existent triangle and
results in an error; a trwdth
equal to 1 only includes the current
point with weight 1 and no neighbouring points. For the stick-based
equivalents, the units of the time axis are used for the triangle width.
One number, the weighted autocorrelation or crosscorrelation
Ron Wehrens
de Gelder, R., Wehrens, R. and Hageman, J.A. (2001) "A generalized expression for the similarity of spectra: Application to powder diffraction pattern classification", Journal of Computational Chemistry, 22, 273 – 289.
1 2 3 4 | data(gaschrom)
wcc(gaschrom[1,], gaschrom[2,], 20)
wcc.st(gaschrom.st[[1]], gaschrom.st[[2]], 20)
|
[1] 0.9942493
[1] 0.9279658
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.