How can the data be accurately clustered?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Greetings, I possess a dataset labeled as "Data," which encompasses four columns. Following this, I have employed the K-means algorithm to generate clusters, assigning the Cluster Value 6 to the variable "clusters" in the respective cells. Nevertheless, it has come to my attention that certain values within these clusters are inaccurately assigned to other clusters.
I am in need of guidance regarding the reassignment of clusters utilizing a specific algorithm. The ground truth is depicted in the attached image. I would greatly appreciate assistance with this endeavor.
disp('Calculating Centroid')
K=6;
[idx,C,sumdist] = kmeans(Data,K,'Display','final');
dataset=Data;
dataset_idx=zeros(length(dataset),5);
dataset_idx=dataset(:,1:4);
dataset_idx(:,5)=idx;
clusters = cell(K,1);
for i = 1:K
clusters{i} = dataset_idx(dataset_idx(:,5) == i,:);
end
cluster_assignments=idx;
7 Kommentare
Antworten (1)
Siehe auch
Kategorien
Mehr zu Get Started with Statistics and Machine Learning Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!