How can I get the values for the distances between samples in a HCA

2 vues (au cours des 30 derniers jours)
Rafael Freire
Rafael Freire le 27 Août 2015
Commenté : Rafael Freire le 27 Août 2015
Let´s consider we have the folowing HCA
data = randi(1000,10,30);
HCA_Number_of_Clusters=3;
dist = pdist(data, 'euclidean');
link = linkage(dist, 'ward');
clust = cluster(link, 'maxclust', HCA_Number_of_Clusters);
color = link(end-HCA_Number_of_Clusters+2,3)-eps;
for i=1:size(data,1)
names{i,1}=num2str(i);
end
figure,
[H, T, outperm]=dendrogram(link , 0,'labels',names , 'colorthreshold', color);
How can I get the values for the distances between samples. It can be a matrix with the distances between all samples or a vector with distance values for a specified sample for example sample 5. Thank you
  1 commentaire
Rafael Freire
Rafael Freire le 27 Août 2015
How to create a vector with the distances from sample 1? like Sample 1 distance from Sample 1 is 0 Sample 1 distance from Sample 2 is 1800 Sample 1 distance from Sample 6 is 1800 Sample 1 distance from Sample 4 is 2400 Sample 1 distance from Sample 7 is 2400 and on...

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Performance and Memory dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by