twdtwMatches-class: class "twdtwMatches"

Description Usage Arguments Methods (by generic) Slots Author(s) See Also Examples

Description

Class for Time-Weighted Dynamic Time Warping results.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
## S4 method for signature 'ANY'
twdtwMatches(timeseries = NULL, patterns = NULL,
  alignments = NULL)

## S4 method for signature 'twdtwMatches'
index(x)

## S4 method for signature 'twdtwMatches'
length(x)

## S4 method for signature 'twdtwMatches'
as.list(x)

## S4 method for signature 'twdtwRaster'
as.list(x)

## S4 method for signature 'twdtwMatches,ANY,ANY,ANY'
x[i, j, drop = TRUE]

## S4 method for signature 'twdtwMatches,numeric,ANY'
x[[i, j, drop = TRUE]]

## S4 method for signature 'twdtwMatches'
labels(object)

## S4 method for signature 'twdtwMatches'
show(object)

## S4 method for signature 'ANY'
is.twdtwMatches(x)

Arguments

timeseries

a twdtwTimeSeries object.

patterns

a twdtwTimeSeries object.

alignments

an object of class list with the TWDTW results with the same length as timeseries or a list of twdtwMatches.

x

an object of class twdtwMatches.

i

indices of the time series.

j

indices of the pattern.

drop

if TRUE returns a data.frame, if FALSE returns a list. Default is TRUE.

object

an object of class twdtwMatches.

labels

a vector with labels of the time series.

...

objects of class twdtwMatches.

Methods (by generic)

Slots

timeseries:

An object of class twdtwTimeSeries-class with the satellite time series.

pattern:

An object of class twdtwTimeSeries-class with the temporal patterns.

alignments:

A list of TWDTW results with the same length as the timeseries. Each element in this list has the following results for each temporal pattern in patterns:
from: a vector with the starting dates of each match in the format "YYYY-MM-DD",
to: a vector with the ending dates of each match in the format "YYYY-MM-DD",
distance: a vector with TWDTW dissimilarity measure, and
K: the number of matches of the pattern.

This list might have additional elements:

if keep=TRUE in the twdtwApply call the list is extended to include internal structures used during the TWDTW computation:
costMatrix: cumulative cost matrix,
directionMatrix: directions of steps that would be taken from each element of matrix,
startingMatrix: the starting points of each element of the matrix,
stepPattern: stepPattern used for the computation, see package dtw,
N: the length of the pattern,
M: the length of the time series timeseries,
timeWeight: time weight matrix,
localMatrix: local cost matrix,
matching: A list whose elements have the matching points for each match between pattern the time series, such that:
index1: a vector with matching points of the pattern, and
index2: a vector with matching points of the time series.

Author(s)

Victor Maus, [email protected]

See Also

twdtwApply, twdtwTimeSeries-class, and twdtwRaster-class

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
ts = twdtwTimeSeries(timeseries=MOD13Q1.ts.list)
patterns = twdtwTimeSeries(timeseries=MOD13Q1.patterns.list)
matches = twdtwApply(x = ts, y = patterns)
class(matches)
length(matches)
matches 
# Creating objects of class twdtwMatches 
ts  = twdtwTimeSeries(MOD13Q1.ts.list)
patt = twdtwTimeSeries(MOD13Q1.patterns.list)
mat = twdtwApply(ts, patt, weight.fun = logisticWeight(-0.1, 100))
mat = twdtwMatches(ts, patterns=patt, alignments=mat)
mat

vwmaus/dtwSat documentation built on Sept. 11, 2018, 7:52 a.m.