Evaluate Time Series Clustering

6 Ansichten (letzte 30 Tage)
john corbett
john corbett am 24 Sep. 2018
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

Antworten (0)

Kategorien

Mehr zu Random Number Generation finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by