Effacer les filtres
Effacer les filtres

Can't loop k-clustering gap stat function

1 vue (au cours des 30 derniers jours)
BOB
BOB le 21 Jan 2019
Hi folks,
I want to loop the following function 20 times to determine the mode of the "OptimalK" output from the evalclusters function. But the error "Error using classreg.learning.internal.DisallowVectorOps/subsasgn (line 28) You cannot assign to an object of class clustering.evaluation.GapEvaluation using () indexing."
If anyone could help with this, and also show how to store the outputted "OptimalK" values that would be great. Thanks for any help!
for r = 1:20
x = DATASET(:,11:14);
eva(r) = evalclusters(x,'kmeans','gap','Klist',[1:20])
end

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by