Exploring AML Designer Transforms: Edit Metadata and Convert to Indicator Values

30 minutes
  • 4 Learning Objectives

About this Hands-on Lab

A large amount of time for machine learning tasks is spent understanding the data and getting it into the proper configuration to train the model. This is the Data Wrangling, Exploration, and Cleaning phase of the machine learning lifecycle. In Azure Machine Learning Designer, many common data changing operations are provided as transform modules.

In this lab, you will explore the `Edit Metadata` and `Convert to Indicator Values` modules to gain a deeper understanding of the tools at your disposal.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Set Up the Workspace

Log in and go to the Azure Machine Learning Studio workspace provided in the lab.

Create a Training Cluster of D2 instances.

Create a new blank Pipeline in the Azure Machine Learning Studio Designer.

Explore Convert to Indicator Values

Add an Automobile price data (Raw) dataset node to the canvas. Visualize the data and find a text column with a small number of unique values. Many features in this dataset are categorical.

Use an Edit Metadata transform node to mark the column as Categorical.

Use a Convert to Indicator Values transform node to one-hot encode the column now marked as Categorical. Remove the original column to avoid passing the same data to the model in multiple ways. You will need to manually input the column name since you have not run the pipeline yet.

Explore Edit Metadata

The Convert to Indicator Values node will create new columns. These are features, and should be marked as such. Use another Edit Metadata node to change all columns to features.

Two models need to be created from this data, one that predicts price, and one that predicts city-mpg. Use Edit Metadata nodes to mark price as the label in one dataset and city-mpg as the label in another.

Submit the Pipeline to perform all of the transformations.

Visualize the Transformed Data

When the pipeline finishes, inspect the output of the Convert to Indicator Value node. Has the data changed? Has the metadata changed?

Inspect each Edit Metadata node used to set a column as a label. Has the actual data changed? Has the metadata changed?

You only changed one categorical field, but this process can be repeated to further improve the dataset. This preprocessing also only had to be done once, even though you ended with two datasets to train models.

Additional Resources

Datasets can be changed to be easier to use further in the pipeline. Two of the Azure Machine Learning Designer modules that facilitate this are Edit Metadata and Convert to Indicator Values. The two are closely linked, so we're going to explore them together. Edit Metadata can update column names, mark columns as features or labels, mark columns as categorical, and change data types. Convert to Indicator Values takes a column marked as categorical and performs a One Hot Encoding on the data to create multiple indicator columns rather than a single value. Together, these modules can make other pipeline steps much easier to use.

Lab Goals

  1. Setup the Workspace
  2. Explore Edit Metadata and Convert to Indicator Values

Logging in to the lab environment

To avoid issues with the lab, use a new Incognito or Private browser window to log in to the lab. This ensures that your personal account credentials, which may be active in your main window, are not used for the lab.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?