Java Distance node: generalization and iteration over all input columns

Hello everybody,

I'm trying to use Java Distance node in order to define a customized distance type. In the description node the Euclidean distance definition of the columns c1 and c2 is exemplified as:

 

sqrt(sqr($row1.c1$-$row2.c1$)+sqr($row1.c2$-$row2.c2$))

 

Is it possible to generalize the formula in order to iterate over all the columns coming in input? This is especially important if the number of column is large and cannot be edited by hand.

Thanks in advance for any suggestion.

Best,

Gio

Hi Gio,

no this is not possible. 

Maybe you can use a combined distance? By first calculating the distance using a numerical distance and combining the distances (aggregate distances)? 

Here you can find the documentation of the nodes: https://www.knime.org/blog/distance-measures-in-knime 

Best, Iris

Hi Iris,

Thank you for your answer. I will give a try to what you suggested.

Best,

Gio