Title: | A Modified DTW Algorithm for Stratigraphic Time Series Alignment |
---|---|
Description: | A dynamic time warping (DTW) algorithm for stratigraphic alignment, translated into R from the original published 'MATLAB' code by Hay et al. (2019) <doi:10.1130/G46019.1>. The DTW algorithm incorporates two geologically relevant parameters (g and edge) for augmenting the typical DTW cost matrix, allowing for a range of sedimentologic and chronologic conditions to be explored, as well as the generation of an alignment library (as opposed to a single alignment solution). The g parameter relates to the relative sediment accumulation rate between the two time series records, while the edge parameter relates to the amount of total shared time between the records. Note that this algorithm is used for all DTW alignments in the Align Shiny application, detailed in Hagen et al. (in review). |
Authors: | Cedric Hagen |
Maintainer: | Cedric Hagen <[email protected]> |
License: | GPL-3 |
Version: | 0.1.0 |
Built: | 2024-11-20 06:23:29 UTC |
Source: | CRAN |
A synthetic record, resembling d13C data, for testing the DTW algorithm
candidate_data
candidate_data
## 'candidate_data' An array with 50 rows and 2 columns:
Synthetic d13C values
Synthetic meterage values
...
Cedric Hagen
dtw_r
dtw_r(target, candidate, g, edge)
dtw_r(target, candidate, g, edge)
target |
The target time series |
candidate |
The candidate time series |
g |
The g parameter value for alignment |
edge |
The edge parameter value for alignment |
The aligned candidate dataset (ri,t_out) and the corresponding Pearson's correlation coefficient (xc).
dtw_r(target_data,candidate_data,0.98,0.15)
dtw_r(target_data,candidate_data,0.98,0.15)
A synthetic record, resembling d13C data, for testing the DTW algorithm
target_data
target_data
## 'target_data' An array with 251 rows and 2 columns:
Synthetic d13C values
Synthetic meterage values
...
Cedric Hagen