필터 지우기
필터 지우기

Anyone an expert in K-means clustering?

조회 수: 1 (최근 30일)
Z
Z 2013년 6월 27일
I have a really large matrix and I have two different classes with many different parameters involved. When I try to use K-means clustering, I get a weird graph with like hundreds of vertical blue lines. Why is this?
X = mydata(1:1016,1);
IDX = kmeans(X,2);
plot(IDX)
Thanks in advance!

채택된 답변

Walter Roberson
Walter Roberson 2013년 6월 27일
Your plot axes data area is probably not at least 1016 pixels wide, so multiple x values are being aliased to the same horizontal distance from the axis. As you only have two distinct output values, each time you have that kind of aliasing and the two values involved differ, you will get a vertical line. If you zoom in the vertical lines will disappear.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by