I am new to KNIME and am working on an exercise in which I have to create k-Means clustering for 100+ different inputs, each with a different number of clusters.
For example, input category “1” would have three clusters while input category “2” would have four clusters. The intended output would be three k-Means clusters for “1” and four k-Means clusters for “2.”
Is this possible? And if so, how? Thank you so much for the help!
Hi @kendyhuang,
You can use Loops for that. One way would be to use a Counting Loop Start with the required number of iterations. Then you can use a Math Formula (Variable) to calculate the number of clusters from the iteration number as $currentIteration$ + 3 (first iteration has the number 0) and then you pass this flow variable to the k-means node and use it as the number of clusters.
Is this an exercise for school or work? Would be nice to have a bit more context
Kind regards,
Alexander