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
Standard_D2_v2
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 predictscity-mpg
. Use Edit Metadata nodes to markprice
as the label in one dataset andcity-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.