Multiclass problems

If the number of possible outcomes for target is larger than two, in general, we have to predict either the expected probability distribution of the target values or at least the list of ordered values—hopefully augmented by a rank variable, which can be used for additional analysis.

While some algorithms, such as decision trees, can natively predict multivalued attributes. A common technique is to reduce the prediction of one of the K target values to (K-1) binary classification problems by choosing one of the values as the base and building (K-1) binary classifiers. It is usually a good idea to select the most populated level as the base.

Get Mastering Scala Machine Learning now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.