K-Means Cluster Input Parameters Based on Dynamic Loop Input

Hi All,

Is there any way that I could setup k-means cluster parameters input from excel input?
I think it’s using flow variables but I’m not sure how it should be done. In addition to that, the parameters input will be dynamic since it’s in a loop.

For instance in the workfile below. I have 10 clusters in the data generator before input to loop. I want to add math formula in the additional column with formula excel “=ROUNDUP(COUNTA(“Cluster Membership”)*7/300,0)” which the results would be an input to the k-means cluster parameter and it would repeated 10 times with each of the cluster membership will have different k-means input.

Is there any way to do this?

Thanks in advance! Let me know if you need clarification

KNIME_project.knwf (25.2 KB)

I am not sure I am totally clear on the ask, however I will take a stab at it…

So you want to do a math formula that includes a count of the number of rows in each ‘cluster’ (generated by the Data Generator node), then run it through K-Means node and through the rest of your workflow. Is that correct?

So your workflow would go:
Data generation --> Math Formula --> K-Means --> rest of your workflow.

Am I understanding correctly? It should be possible, however, I’m not sure the math formula would make any difference in the output of your K-Means clustering. The result of your math formula will be a constant for each cluster/group generated by your Data Generation node. And since you’re grouping your data by cluster before pushing it into the K-Means node, the output of the math formula (constant value) will not make a difference to the output of the K-Means node.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.