Value Counter and K-means: get 0.1 of the class size

Hello

I have a node "Value Counter"  that give me number of examples at each class. How i can get the value of the value counter(one of them) and then i want to pass to k-means that to use 0.1 of the size as nrclusters?

 

Malik

Hi Malik,

you can use the math node to get the 0.1 of the size as nrclusters.

Afterwards you need to convert the value into a flow variable. e.g. using the table row to variable node. This variable you than can use in the k-means node.

You might want to take a look at this video: https://www.youtube.com/watch?v=yEDkzIfckqE

Where I did something similar.

Cheers, Iris