Non-linear alignment using Correlation Optimized
warping (COW). This is cow
but with argument structure like
other ..._align functions.
# Default S3 method
cow_align(
x,
y = NULL,
by = NULL,
seg,
slack,
print.report = FALSE,
r.power = FALSE,
pad.method = 1,
...
)
Based on matlab code at http://www.models.life.ku.dk/dtw_cow.
First vector
or a data.frame
containing
vector
to use as reference when COW aligning y
data.
Second vector
or data.frame
containing
vector
to COW warp align with x
.
If x
or y
are data.frames
, the
names of data columns to aligned.
Segment size for warping.
Segment size expansion/compression range.
(logical) print segment report.
(logical or numeric) correlation power (1-4).
Handling method if x
and
y
are different lengths: 1 (default) Start with
start-points aligned; 2 Start with mid-point aligned.
Other arguments, typically applied by generic
alignment
methods or ignored.
By default, cor_align
returns x
and y
as an aligned data.frame
. It also provides a lag correlation
profile (plot) and alignment report. The extra function
,
output
, can be used to modify this behavior, see also
alignment
.
This function is based on previous matlab (see Source),
but some formal arguments and parameters have been changed to
make function more consistent with other alignment
functions.
Correlation optimized warping was developed as a preprocessing method for chromatographic Data:
Niels-Peter Vest Nielsen, Jens Micheal Carstensen and Jorn Smedegaard, 1998, Aligning of single and multiple wavelength chromatographic profiles for chemometric data analysis using correlation optimised warping. J. Chrom. A 805(1998), 17-35
Giorgio Tomasi, Frans van den Berg and Claus Andersson, 2004, Correlation optimized warping and dynamic time warping as preprocessing methods for chromatographic Data, Journal of Chemometrics 18 (2004), 231-241.