Linkages other than Ward in evalcluster
Mostra commenti meno recenti
Hi,
Is there any way to change the linkage to any desired linkage (e.g., average, complete, single, cetroid, etc.) in evalcluster?
Right now it says that linkage is set to Ward by default
Please advise
Risposte (1)
Hamoon
il 14 Set 2015
1 voto
4 Commenti
Yes, you can change it. you can define a function handle using clusterdata for that. look at this code for example:
myfunc = @(x,k) clusterdata(x,'linkage','average','maxclust',k);
eva = evalclusters(x,myfunc,'CalinskiHarabasz',...
'klist',[1:6]);
for myfunc, x is the input data and k is the number of clusters. then evalclusters evaluate performance of myfunc clustering (here linkage with average method)
you can change the options for linkage in myfunc, for example you can write this:
myfunc = @(x,k) clusterdata(x,'linkage','weighted','maxclust',k);
check this example:
load fisheriris;
myfunc = @(x,k) clusterdata(x,'linkage','weighted','maxclust',k);
eva = evalclusters(meas,myfunc,'CalinskiHarabasz',...
'klist',[1:6]);
to find out which options you have for myfunc when you want to use linkage, check linkage and clusterdata
Is it clear enough?
Taro Ichimura
il 10 Giu 2016
Hello, can't we estimate the number of k cluster before doing the clustering? This is unclear to me, especially why using 'maxclust' with k cluster without knowing in advance the best clustering method and number? Please could you provide more precision?
Categorie
Scopri di più su Hierarchical Clustering in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!