Borrar filtros
Borrar filtros

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

2 visualizaciones (últimos 30 días)
Rafael Freire
Rafael Freire el 27 de Ag. de 2015
Comentada: Rafael Freire el 27 de Ag. de 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 comentario
Rafael Freire
Rafael Freire el 27 de Ag. de 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...

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Performance and Memory en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by