wcc                  package:wccsom                  R Documentation

_A_g_r_e_e_m_e_n_t _b_e_t_w_e_e_n _p_a_t_t_e_r_n_s _i_n_c_l_u_d_i_n_g _p_e_a_k _s_h_i_f_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     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.

_U_s_a_g_e:

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

_A_r_g_u_m_e_n_t_s:

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.

_V_a_l_u_e:

     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.

_A_u_t_h_o_r(_s):

     Ron Wehrens

_R_e_f_e_r_e_n_c_e_s:

     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.

_S_e_e _A_l_s_o:

     'WCCSOM'

_E_x_a_m_p_l_e_s:

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

