funHDDCwavelet: Perform the funHDDCwavelet algorithm on a matrix of time...

Description Usage Arguments Examples

Description

This package provide an implementation of the funHDDCwavelet algorithm. This algorithm allow the clustering of time series by representing them in a parcimonious and multi-resolution way.

Usage

1
2
3
4
5
6
funHDDCwavelet(X, K, minD = 1, maxD = 1,
  max.level = round(log2(ncol(X))), dimTest = "scree",
  wavelet.family = "DaubExPhase", wavelet.filter.number = 4,
  init = "kmeans", minPerClass = 10, threshold = 0.01,
  minIter = 10, maxIter = 50, poolSize = 5, verbose = FALSE,
  viz = F)

Arguments

X

A matrix of time series (each line correspond to a time serie, each column to an time point)

K

The number of classes to find

minD

The minimum dimension of the subspace where a level can be represented (default : 1)

maxD

The maximum dimension of the subspace where a level can be represented (default : 1)

max.level

The maximum wavelet transform level used in the algorithm (default : all levels, depending of the time serie length)

dimTest

The intrinsec dimension estimation method. Available : "scree", "kss", "mean", "XX%" (ex "85%") (default: "scree")

wavelet.family

The wavelet family used for the discrete wavelet transform (see wavethresh package). Default : "DaubExPhase"

wavelet.filter.number

The filter number used in for the discrete wavelet transform (see wavethresh package). Default : 4

init

Type of initialization method. Available : "kmeans", "random" (default : "kmeans")

minPerClass

The minimal size of the initial classes

threshold

The threshold used to determine that the log-likelihood converged. Default : 0.01

minIter

The minimal number of iterations of the EM algorithm

maxIter

The maximal number of iterations of the EM algorithm

poolSize

The number of run of the algorithm (the algorithm is executed poolSize times, and the best model is selected via BIC) Default : 5

verbose

if TRUE, prompt some information of the algorithm status over time

viz

if TRUE, plot the first 2 axes of the data after principal component analysis, with current cluster repartitions and colors

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
dataset = generateDataset()
X = dataset$X
real_cluster = dataset$col

# Haar wavelet
result = funHDDCwavelet(X,K=3,minD=1,maxD=1,wavelet.family="DaubExPhase",
                        wavelet.filter.number=1,viz=TRUE,minIter=10)
clusters = apply(result$tm,1,which.max)
adjustedRandIndex(clusters,real_cluster)
plot.curve.dataset(X,col=clusters,ratio=0.1)

## End(Not run)

Erwangf/funHDDC-wavelet documentation built on June 7, 2019, 12:51 a.m.