Kmeans returns negative values in cluster centroids?

7 visualizaciones (últimos 30 días)
Eric Nunes
Eric Nunes el 3 de Mzo. de 2014
I am performing kmeans on a dataset , with 500 points and 1000 dimensions. The dataset is a histogram, where each dimension is a positive integer value. I manually provide the initial class centroids. I have defined the kmeans as:
if true
opts = statset('MaxIter', 50);
[C, cluster_centroids] = kmeans(data,[],'start',centroids,'options',opts,'emptyaction','drop')
end
But the cluster centroids has negative values in it. I don't understand how since for kmeans while updating the centroids for each iteration , it just takes the average of the data points. Since all the values are positive , how can you have negative averages. Am i missing something?
Thanks, Eric

Respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by