clusterData {TimeSeriesExperiment}R Documentation

Cluster time series data.

Description

Perform cluster assignment using hierarchical clustering and static or dynamic branch cutting. If 'subset' is specified the clsutering is performed on the subset of the data, and the rest of the rows are assigned based on the distances to the centroids of computed clusters.

Usage

clusterData(
  X,
  dist = "euclidean",
  dynamic = FALSE,
  hclust_params = list(),
  static_cut_params = list(h = 0.5),
  dynamic_cut_params = list(max_height = 0.9)
)

Arguments

X

a data matrix or data.frame where rows are time series.

dist

the distance metric for the dissimilarity used for clustering.

dynamic

whether dynamic branch cutting should be done for cluster assignment.

hclust_params

parameters for hclust function.

static_cut_params

parameters for assignClusterStatic.

dynamic_cut_params

parameters for assignClusterDynamic.

Value

a list with the hclust object, as well as clust_map and clust_centroids data.frames.

Examples

data("endoderm_small")
endoderm_small <- normalizeData(endoderm_small)
X <- SummarizedExperiment::assays(endoderm_small)$norm
clust_res <- clusterData(X)
head(clust_res$clust_centroids)
head(clust_res$clust_map)


[Package TimeSeriesExperiment version 1.12.0 Index]