Evaluate Time Series Clustering

5 次查看(过去 30 天)
john corbett
john corbett 2018-9-24
I am trying to cluster whole time series' that are similar to one another using DTW distances, linkages, and the cluster function. Is it appropriate to use Silhouette score as a way of determining how well time series' are grouped together? I have been using this to determine the number of clusters I should use and the configuration with the best silhouette score does not look like it is doing the best job upon visual inspection of the clusters.
X = data';% matrix of time series' row-individual time series, col-values for series
d = pdist(X,@(Xi,Xj) dtwdist(Xi,Xj,6,'euclidean'));
Z = linkage(d,link);
clust = [];
for i=1:10
Z = linkage(d);
clust(:,i) = cluster(Z, 'maxclust', i); %e.g. numClusters = 5
end
eva = evalclusters(X,clust,'Silhouette');
This is the function that is being used to find the DTW distances
function d = dtwdist(Xi, Xj, varargin)
[m,n] = size(Xj);
% preallocate
d = zeros(m,1);
for j=1:m
d(j) = dtw(Xi, Xj(j,:), varargin{:});
end

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Random Number Generation 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by