clusterer

This module provides time series clustering functionality using complex invariant distance. For details see Steinmann et al (2020)

ema_workbench.analysis.clusterer.apply_agglomerative_clustering(distances, n_clusters, metric='precomputed', linkage='average')

apply agglomerative clustering to the distances

Parameters:
  • distances (ndarray)

  • n_clusters (int)

  • metric (str, optional. The distance metric to use. The default is 'precomputed'. For a list of available metrics, see the documentation of scipy.spatial.distance.pdist.)

  • linkage ({'average', 'complete', 'single'})

Return type:

1D ndarray with cluster assignment

ema_workbench.analysis.clusterer.calculate_cid(data, condensed_form=False)

calculate the complex invariant distance between all rows

Parameters:
  • data (2d ndarray)

  • condensed_form (bool, optional)

Returns:

a 2D ndarray with the distances between all time series, or condensed form similar to scipy.spatial.distance.pdist¶

Return type:

distances

ema_workbench.analysis.clusterer.plot_dendrogram(distances)

plot dendrogram for distances