Learn R Programming

dtwSat (version 0.2.8)

plotAlignments: Plotting alignments

Description

Method for plotting the alignments and TWDTW dissimilarity measures.

Usage

plotAlignments(
  x,
  timeseries.labels = NULL,
  patterns.labels = NULL,
  attr = 1,
  threshold = Inf
)

Value

A ggplot object.

Arguments

x

An object of class twdtwMatches.

timeseries.labels

the label or index of the time series. Default is 1.

patterns.labels

a vector with labels of the patterns. If not declared the function will plot the alignments for all patterns in x.

attr

An integer or character vector indicating the attribute for plotting. Default is 1.

threshold

A number. The TWDTW dissimilarity threshold, i.e. the maximum TWDTW cost for consideration. Default is Inf.

Author

Victor Maus, vwmaus1@gmail.com

References

Maus:2019dtwSat

Maus:2016dtwSat

See Also

twdtwMatches-class, twdtwApply, plotPaths, plotCostMatrix, plotMatches, and plotClassification.

Examples

Run this code
log_fun = logisticWeight(-0.1, 100)
ts = twdtwTimeSeries(MOD13Q1.ts.list)
patt = twdtwTimeSeries(MOD13Q1.patterns.list)
mat1 = twdtwApply(x=ts, y=patt, weight.fun=log_fun, keep=TRUE, legacy=TRUE)

plotAlignments(mat1)

plotAlignments(mat1, attr=c("evi","ndvi"))

Run the code above in your browser using DataLab