The SetToFlag node is a very convenient node that converts a single nominal variable into as many binary columns as desired, one column for each nominal variable value. However, the default values for the node are
F, which unfortunately cannot be used for any nodes that require numeric values. In this recipe we will create flag variables that can be used in Aggregate nodes, Means nodes, and other numeric operations. Using numeric values (
0 in this recipe) will work with any nodes that require flag or nominal values such as Association Rules and the grouping variable for the Means node (as T and F will), but will also work as numeric values in nodes such as the Aggregate node.