0
我想知道MatLab中cluster
和clusterdata
算法之间的区别。 原因是,我有此代码与MatLab中cluster和clusterdata之间的区别
% First method
y = pdist(X, 'chebyshev');
z = linkage(y, 'single');
cl = cluster(z, 'maxclust', 10);
figure;
scatter3(X(:,1), X(:,2), X(:,3), 10, cl)
% second method
H = clusterdata(X,'linkage', 'single', 'distance', 'chebyshev', 'maxclust',10);
figure;
scatter3(X(:,1), X(:,2), X(:,3), 10, H)
我已附加从这两种方法的两位数字相同的选项。我不明白他们为什么有不同的产出。
这只是我在编写代码时犯的一个错误。我正在使用相同的距离参数。他们都是切比雪夫。我会更新这个问题。 – Ashkan