liveBook · Manning

Multiclass classification

As explained in Ensemble Methods for Machine Learning

Multiclass classification is a supervised prediction task whose target has more than two categorical classes.

Multiclass classification predicts one categorical label from more than two possible classes. It extends binary classification beyond yes-or-no decisions, such as assigning a query-document pair to least, moderate, or high relevance. section 1.3 section 6.5.1

The task appears in several modeling settings:

  • Predict a relevance class for each query-document pair in the LETOR data set. section 6.5.1
  • Use an AdaBoost ensemble whose implementation supports more than two target classes. section 4.2.3
  • Represent each class probability separately when combining predictions from multiple classifiers. section 3.1.2

AdaBoost on Iris

A scikit-learn example loads the Iris data, splits it into training and test sets, trains 20 shallow-tree AdaBoost learners with learning_rate=0.75 and algorithm='SAMME.R', and reports a test error of 0.07895. section 4.2.3

ensemble = AdaBoostClassifier(base_estimator=shallow_tree,
                             n_estimators=20,              
                             learning_rate=0.75, algorithm='SAMME.R')
ensemble.fit(Xtrn, ytrn)
ypred = ensemble.predict(Xtst)
err = 1 - accuracy_score(ytst, ypred)
print(err)

Shows the complete multiclass AdaBoost training, prediction, and accuracy-error calculation. section 4.2.3

How Ensemble Methods for Machine Learning covers it

How deep it goes
Defines the task and demonstrates library-based ensemble use, while deferring general multiclass algorithms and detailed probability mechanics.
Examples
Uses Iris class prediction, LETOR relevance ranking, and per-class probabilities from ensemble classifiers.
What it assumes
Assumes labeled examples and basic classification practice, while distinguishing multiclass labels from binary and continuous targets.
What you can do after
Apply it via scikit-learn’s AdaBoostClassifier to train, predict, and measure error on multiclass data.
How it connects
Connects supervised learning, binary classification, regression, AdaBoost, decision trees, prediction probabilities, and ensemble methods.

Also explained in

Compare how 2 books explain multiclass classification →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Ensemble Methods for Machine Learning. The section links point to the parts of the book it draws on.