Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

how do i rectify the error that i have got while performing the kmeans clustering

1 Ansicht (letzte 30 Tage)
sudarshan r
sudarshan r am 26 Mär. 2017
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
color based segmentation using kmeans clustering how do i use 'start' key word in kmeans..i have tried a code but it gives an error it must have k rows how to solve it the code i tried is here
[cluster_idx, cluster_center] = kmeans(ab,nColors,'distance','sqEuclidean', ...
'Replicates', 4, 'start',seeds);
rng(123); %// Set seed for reproducibility
numReplicates = 4;
ind = randperm(size(ab,1),numReplicates*nColors);
% ind=ind(1:numReplicates*nColors);
seeds = permute(reshape(ab(ind,:).', [2 nColors numReplicates]), [2 1 3]);
%// Now call kmeans
[cluster_idx, cluster_center] = kmeans(ab,nColors,'distance','sqEuclidean', ...
'Replicates', numReplicates, 'start', seeds);

Antworten (0)

Diese Frage ist geschlossen.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by