Effacer les filtres
Effacer les filtres

Finding labels of a linkage.

1 vue (au cours des 30 derniers jours)
BHAGYALAKSHMI M
BHAGYALAKSHMI M le 9 Mar 2020
How can I find the labels of the linkage clustering? Anybody, Please help me.

Réponses (1)

Ameer Hamza
Ameer Hamza le 9 Mar 2020
Similar to your other question, I used the same dataset to show how to determine the cluster labels
You need to use the function cluster to extract the cluster number of each data point. For example,
data=readtable('Liverxl.xlsx', 'ReadVariableNames', false);
data.Var2 = findgroups(data.Var2); % convert column
data.Var10(isnan(data.Var10)) = 0; % place 0 in empty cells
data = table2array(data);
maximum_num_clusters = 5;
Z = linkage(data, 'average');
cluster_labels = cluster(Z, 'Maxclust', maximum_num_clusters);
clusters = splitapply(@(x) {x}, data, cluster_labels);
Again here, clusters is a cell array.

Community Treasure Hunt

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

Start Hunting!

Translated by