What is the meaning of title "phase" and "num" in the Kmeans function when the display option is on? I kind of guess the "num" representing the number of outliers. Is my guessing right?

 Accepted Answer

the cyclist
the cyclist on 4 Oct 2016
phase refers to "batch update" (1) or "online update" (2). The meaning of these phases is described in the kmeans documentation, in the section Name-Value Pair Arguments section, under "Online Phase".
I believe that num is the number of clusters found after each iteration, but I could not find that stated in the documentation.

5 Comments

Thank you very much for the answering. It would be kinda of strange if the num represents the number of clusters, since it should be predefined by the users.
Yeah, that would be strange ... and I got that wrong. :-)
I was able to spend time looking at the code, which is fairly intricate. I'm pretty sure now that for each iteration, num is actually the number of points that moved from their current cluster to a different one. So, for a problem with N points, it will always start at N for the first iteration (because each point is assigned to a brand-new cluster). If one uses online updates, I think it will always end at 0. It might not be 0 if you only use batch updates.
The algorithm is well buried, in the routine kmeans2(), which is called by kmeans. I still couldn't find this referenced in the documentation.
Sorry for the earlier misinformation.
Thank you very much, cyclist. I would guess the "num" representing the number of uncertain labeling, so as iterations goes up, the uncertainty will go down.
Yes, I would say that that is a reasonable conceptual way of thinking about it.
Also, the best form of thanks is accepting a solution, which rewards the contributor, and also points future users toward correct solutions.
Thanks for your answering.

Sign in to comment.

More Answers (0)

Categories

Find more on Statistics and Machine Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!