knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

The Adaptive Matching Interpolated Correlation (AMICo) is a dynamic time warping algorithm designed to infer the moment-by-moment synchronization between two skin conductance (SC) signals.

Algorithm description

In synthesis, for each dyad the algorithm first identifies local maxima and minima (i.e., peaks and valleys) in the two SC signals. Then, it tries to match such features of one signal to those of the other (within a maximum lag) according to the solution that maximizes the similarity of each match across the whole session. A normally distributed weighting can be applied to penalize extreme lags. Each of the two signals are then divided in segments ranging from a given matched feature to the one that follows after at least minSizeSec seconds. The shorter of the two matched segments is then linearly interpolated to match the length of the longer one, in order to compare the shape of the two signals. The range of five seconds is required to have a sufficient number of data-points for each segment and was chosen from visual inspection of typical SC signals. Finally, Pearson correlation is calculated between every segment pair in the session. Results consist in a time-series of correlations, where each matched patient-therapist sequence is associated with one r value



kleinbub/rIP documentation built on June 11, 2025, 3:39 a.m.