twdtw: Time-Weighted Dynamic Time Warping

Provides a fast implementation of Time-Weighted Dynamic Time Warping (TWDTW), a measure for quantifying time series similarity. The TWDTW algorithm, described in Maus et al. (2016) <doi:10.1109/JSTARS.2016.2517118> and Maus et al. (2019) <doi:10.18637/jss.v088.i05>, is applicable to multi-dimensional time series of various resolutions. It is particularly suitable for comparing time series with seasonality for environmental and ecological data analysis, covering domains such as remote sensing imagery, climate data, hydrology, and animal movement. The 'twdtw' package offers a user-friendly 'R' interface, efficient 'Fortran' routines for TWDTW calculations, a k-nearest neighbour model to classify time series, flexible time weighting definitions, as well as utilities for time series preprocessing and visualization. With one temporal pattern for each class, the classification of time series has a processing time comparable to that of other machine learning models available in 'R', such as random forest and support vector machines.

Version: 1.1-0
Imports: Rcpp, proxy
LinkingTo: Rcpp
Suggests: rbenchmark, testthat (≥ 3.0.0)
Published: 2026-11-20
DOI: 10.32614/CRAN.package.twdtw
Author: Victor Maus ORCID iD [aut, cre]
Maintainer: Victor Maus <vwmaus1 at gmail.com>
BugReports: https://github.com/vwmaus/twdtw/issues/
License: GPL (≥ 3)
URL: https://github.com/vwmaus/twdtw/
NeedsCompilation: yes
Materials: README, NEWS
In views: TimeSeries
CRAN checks: twdtw results

Documentation:

Reference manual: twdtw.html , twdtw.pdf

Downloads:

Package source: twdtw_1.1-0.tar.gz
Windows binaries: r-devel: twdtw_1.0-1.zip, r-release: twdtw_1.1-0.zip, r-oldrel: twdtw_1.0-1.zip
macOS binaries: r-release (arm64): twdtw_1.1-0.tgz, r-oldrel (arm64): twdtw_1.1-0.tgz, r-release (x86_64): twdtw_1.1-0.tgz, r-oldrel (x86_64): twdtw_1.1-0.tgz
Old sources: twdtw archive

Reverse dependencies:

Reverse imports: rasterdiv

Linking:

Please use the canonical form https://CRAN.R-project.org/package=twdtw to link to this page.