Apply Transformation
Important
Support for Machine Learning Studio (classic) will end on 31 August 2024. We recommend you transition to Azure Machine Learning by that date.
Beginning 1 December 2021, you will not be able to create new Machine Learning Studio (classic) resources. Through 31 August 2024, you can continue to use the existing Machine Learning Studio (classic) resources.
- See information on moving machine learning projects from ML Studio (classic) to Azure Machine Learning.
- Learn more about Azure Machine Learning.
ML Studio (classic) documentation is being retired and may not be updated in the future.
Applies a well-specified data transformation to a dataset
Category: Machine Learning / Score
Note
Applies to: Machine Learning Studio (classic) only
Similar drag-and-drop modules are available in Azure Machine Learning designer.
Module overview
This article describes how to use the Apply Transformation module in Machine Learning Studio (classic), to modify an input dataset based on a previously computed transformation.
For example, if you used z-scores to normalize your training data by using the Normalize Data module, you would want to use the z-score value that was computed for training during the scoring phase as well. In Machine Learning Studio (classic), you can do this easily by saving the normalization method as a transform, and then using Apply Transformation to apply the z-score to the input data before scoring.
Machine Learning Studio (classic) provides support for creating and then applying many different kinds of custom transformations. For example, you might want to save and then re-use transformations that do the following:
Remove or replace missing values, using Clean Missing Data
Bin, scale, and normalize data, using Normalize Data or Group Data into Bins
Create a set of compact features by calculating joint probability distribution for a dataset, using the Learning with Counts modules.
How to use Apply Transformation
Add the Apply Transformation module to your experiment. You can find thi module under Machine Learning, in the Score category.
Locate an existing transformation to use as an input.
If the transformation was created earlier in the experiment (for example, as part of a cleaning or data scaling operation) typically the ITransform interface object is available on the module's right-hand output. Connect that output to the left-hand input of Apply Transformation.
Previously saved transformations can be found in the Transforms group in the left navigation pane.
Tip
If you design a transformation for an experiment but do not explicitly save it, the transformation is available in the workspace as long as your session is open. If you close the session but do not save the transformation, you can re-run the experiment to generate the ITransform interface object.
Connect the dataset that you want to transform. The dataset should have exactly the same schema (number of columns, column names, data types) as the dataset for which the transformation was first designed.
No other parameters need to be set; all customization is done when defining the transformation.
To apply a transformation to the new dataset, run the experiment.
Examples
To see how this module is used in machine learning, see the Azure AI Gallery:
Online Fraud Detection: This sample demonstrates how to use Apply Transformation with Clean Missing Data, to ensure that missing values are handled the same in all datasets.
Predictive Maintenance: Demonstrates how to use Apply Transformation with Normalize Data.
Learning with Counts: Uses Apply Transformation to reuse a count table.
Technical notes
The Apply Transformation module can take as input the output of any module that creates an ITransform interface. These modules include:
Tip
You can also save and re-use filters designed for digital signal processing. However, filters use the IFilter interface interface, rather than ITransform interface.
Expected inputs
Name | Type | Description |
---|---|---|
Transformation | ITransform interface | A unary data transformation |
Dataset | Data Table | Dataset to be transformed |
Outputs
Name | Type | Description |
---|---|---|
Transformed dataset | Data Table | Transformed dataset |
Exceptions
Exception | Description |
---|---|
Error 0003 | Exception occurs if one or more of inputs are null or empty. |
For a list of errors specific to Studio (classic) modules, see Machine Learning Error codes.
For a list of API exceptions, see Machine Learning REST API Error Codes.
See also
Filter
Apply SQL Transformation
Clean Missing Data
Normalize Data
A-Z Module List
Group Data into Bins