Evaluate Time Series Clustering
조회 수: 7 (최근 30일)
이전 댓글 표시
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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Random Number Generation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!