k-means component [iris]

Hi

How come the render result of kmeans (iris data set) is so different between knime and rstudio
The rstudio is by far better, how could I get the same quality in knime?

and rStudio

Hi Xavier,

This seems to be a question for me :slight_smile:

I get the same results with KNIME if I only use sepal length and width for clustering. But if I include all four dimensions I get what you posted. It is also worth checking the Scatter Matrix, than you see all combinations.

k-means is not a deterministic algorithm. As it is greedy i can stop in local optima of the optimization problems. You can check this by shuffling the input data before the k-means node. Because the node will always use the first k rows for initializing the centers.
image

Could you post the R code you are using?

Best, Iris

1 Like