In this section, we will see how to go beyond binary prediction and try to predict more than one possible outcome. Here, we will shift our attention from predicting one of two classes to predicting one of multiple classes. We will see classifiers that are inherently multiclass, and those that need one-versus-one or one-versus-all approaches in order to work on multiclass data. We will be demonstrating how classifiers can predict the species of flowers in the iris dataset.
First, let's load in the iris dataset, and then let's start talking about multiclass classifiers. Some of the classifiers that we have already seen are already set up effectively for multiclass classification, because we never made an assumption that required two classes. Classifiers that are already set up for multiclass classification include kNNs, decision trees...