pdc.dist: Permutation Distribution Clustering Distance Matrix

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

This function computes and returns the distance matrix computed by the divergence between permutation distributions of time series.

Usage

1
pdcDist(X, m = NULL, t = NULL, divergence = symmetricAlphaDivergence)

Arguments

X

A matrix representing a set of time series. Columns are time series and rows represent time points.

m

Embedding dimension for calculating the permutation distributions. Reasonable values range usually somewhere between 2 and 10. If no embedding dimension is chosen, the MinE heuristic is used to determine the embedding dimension automatically.

t

Time-delay of the embedding

divergence

Divergence measure between discrete distributions. Default is the symmetric alpha divergence.

Details

A valid divergence is always non-negative.

Value

Returns the dissimilarity between two codebooks as floating point number (larger or equal than zero).

Author(s)

Andreas Brandmaier brandmaier@mpib-berlin.mpg.de

References

Brandmaier, A. M. (2015). pdc: An R Package for Complexity-Based Clustering of Time Series. Journal of Statistical Software, 67(5), 1–23.

See Also

pdclust

hclust kmeans

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# create a set of time series consisting
# of sine waves with different degrees of added noise
# and two white noise time series
X <- cbind(
sin(1:500)+rnorm(500,0,.1),
sin(1:500)+rnorm(500,0,.2),
sin(1:500)+rnorm(500,0,.3),
sin(1:500)+rnorm(500,0,.4),
rnorm(500,0,1),
rnorm(500,0,1)
)

# calculate the distance matrix
D <- pdcDist(X,3)

# and plot with lattice package, you will
# be able to spot two clusters: a noise cluster
# and a sine wave cluster
require("lattice")
levelplot(as.matrix(D), col.regions=grey.colors(100,start=0.9, end=0.3))

pdc documentation built on May 2, 2019, 9 a.m.