Kmeans returns negative values in cluster centroids?

조회 수: 3 (최근 30일)
Eric Nunes
Eric Nunes 2014년 3월 3일
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