Kmeans returns negative values in cluster centroids?

3 vues (au cours des 30 derniers jours)
Eric Nunes
Eric Nunes le 3 Mar 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

Réponses (0)

Catégories

En savoir plus sur Statistics and Machine Learning Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by