Evaluate Time Series Clustering

조회 수: 7 (최근 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