Creates a multiclass classification model from an ensemble of binary classification models
Applies to: Machine Learning Studio
This content pertains only to Studio. Similar drag and drop modules have been added to the visual interface in Machine Learning service. Learn more in this article comparing the two versions.
This article describes how to use the One-Vs-All Multiclass module in Azure Machine Learning Studio, to create a classification model that can predict multiple classes, using the "one vs. all" approach.
This module is useful for creating models that predict three or more possible outcomes, when the outcome depends on continuous or categorical predictor variables. This method also lets you use binary classification methods for issues that require multiple output classes.
More about one-vs.all models
While some classification algorithms permit the use of more than two classes by design, others restrict the possible outcomes to one of two values (a binary, or two-class model). However, even binary classification algorithms can be adapted for multi-class classification tasks using a variety of strategies.
This module implements the one vs. all method, in which a binary model is created for each of the multiple output classes. Each of these binary models for the individual classes is assessed against its complement (all other classes in the model) as though it were a binary classification issue. Prediction is then performed by running these binary classifiers, and choosing the prediction with the highest confidence score.
In essence, an ensemble of individual models is created and the results are then merged, to create a single model that predicts all classes. Thus, any binary classifier can be used as the basis for a one-vs-all model.
For example, let’s say you configure a Two-Class Support Vector Machine model and provide that as input to the One-Vs-All Multiclass module. The module would create two-class support vector machine models for all members of the output class and then apply the one-vs-all method to combine the results for all classes.
How to Configure the One-vs-All Classifier
This module creates an ensemble of binary classification models to analyze multiple classes. Therefore, to use this module, you need to configure and train a binary classification model first.
You then connect the binary model to One-Vs-All Multiclass module, and train the ensemble of models by using Train Model with a labeled training dataset.
When you combine the models, even though the training dataset might have multiple class values, the One-Vs-All Multiclass creates multiple binary classification models, optimizes the algorithm for each class, and then merges the models.
Add the One-Vs-All Multiclass to your experiment in Studio. You can find this module under Machine Learning - Initialize, in the Classification category.
The One-Vs-All Multiclass classifier has no configurable parameters of its own. Any customizations must be done in the binary classification model that is provided as input.
If you need help choosing the right algorithm, see these resources:
Add the Train Model module to your experiment, and connect the untrained classifier that is the output of One-Vs-All Multiclass.
On the other input of Train Model, connect a labeled training data set that has multiple class values.
Run the experiment, or select Train Model and click Run Selected.
After training is complete, you can use the model to make multiclass predictions.
Alternatively, you can pass the untrained classifier to Cross-Validate Model for cross-validation against a labeled validation data set.
For examples of how this learning algorithm is used, see the Azure AI Gallery:
Compare Multiclass Classifier sample: Binary classifiers are used for each digit and the results are combined.
|Untrained binary classification model||ILearner interface||An untrained binary classification model|
|Untrained model||ILearner interface||An untrained multiclass classification|
|Error 0013||An exception occurs if the learner that was passed to the module is the wrong type.|
For a list of errors specific to Studio modules, see Machine Learning Error codes
For a list of API exceptions, see Machine Learning REST API Error Codes.