O'Reilly logo

Effective Amazon Machine Learning by Alexis Perrier

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Grouping variables

Groups enable grouping of multiple variables to facilitate applying the same transformations to several variables. The groups section of the recipe has a naming function. Group definition follows this syntax:

"group_name": "group('first_variable','second_variable' )"

Amazon ML has defined a set of default groups based on the type of the variables: ALL_TEXT, ALL_NUMERIC, ALL_CATEGORICAL, ALL_BINARY, and the ALL_INPUTS group for all the variables at once. Let's look at a couple of examples.

Consider the following example where we want to apply the same transformation (normalization) on the age and fare variables. We can define a group and name it TO_BE_NORMALIZED:

"groups" : { "TO_BE_NORMALIZED" : "group('age','fare')", ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required