# log transform features values

Hi all,

is there a way to transform the values of a feature by applying the logarithm?

I was looking in Data Manipulation -> Column -> Transform (and anywhere else) but could not find it.

Thanks for help and kind regards,

Martin

What about the Math Formula node?

Hi there, is there a log base2 tranformation in any nodes? I cant seem to find one.

Cheers

Ben

1 Like

You can use the Math Formula node for this.

Dear all,

It was not clear to me how I could use the Math Formula Node to calculate Log2 of a number (Logarithm with Base 2) in Knime. Actually there is no Log2 in the node, although you can find the "common" base-10 "Log(x)" . However, you can find the "natural", or base-e, log, denoted as "ln(x)".

Thus, you can use the Math Formula Node to do find Log2, by using the the change-of-base formula (based on "ln"):

logbase(X) = ln(X) / ln(base)

That is (for Log2):

log2(X) = ln(X) / ln(2)

Best,

Rodrigo Panepucci

2 Likes