Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Normalize Multiple Features

nick0kcin
6 - Meteoroid

Trying to normalize multiple features with the Multi-Field Formula tool with the following expression (that throws an error):

 

([_CurrentField_] - Min([_CurrentField_])) / (Max([_CurrentField_]) - Min([_CurrentField_]))

 

Is there a way to make this work?

7 REPLIES 7
MichalM
Alteryx
Alteryx

@nick0kcin 

 

The Min and Max functions in the formula tool (and multi-field formula) will only return result from a list of values not from a referenced variable

Min(10, 20, 30)

 

Min.png

 

In order to calculate, you will need to use the Summarize tool and append these to your data

 

min-max-append.png

nick0kcin
6 - Meteoroid

That's unfortunate, thanks for the information.

MichalM
Alteryx
Alteryx

There might be different ways of approaching it. Could you share sample of your data and a bit more context around what you're hoping to achieve?

nick0kcin
6 - Meteoroid

The operation itself is simple to do in the Python tool for multiple columns (I have hundreds which I'd like to apply the transformation to).

 

For example: 

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/How-to-do-Feature-Normalization-in-Alt...

 

I was hoping to save a step for having to select all of the numerical columns in the data first by using the Multi-Field Formula tool's numeric filter and dynamically performing the calculation there.

MichalM
Alteryx
Alteryx

@nick0kcin 

 

You can use the Dynamic Select to do the same and then a combination of Transpose and Crosstab to make this dynamic. Example attached.

 

nromalised.png

 

 

nick0kcin
6 - Meteoroid

Perfect, thanks.

nick0kcin
6 - Meteoroid

Slight revision to the equation posted in the example for completeness. Should be: (([Value]-[Min]))/([Max]-[Min])

 

 

Labels