Kmeans returns negative values in cluster centroids?

4 次查看(过去 30 天)
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

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Statistics and Machine Learning Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by