Training for classification models
In this recipe, we will visit the basic concepts of training a model to solve a classification problem. We will apply them to optimize the classification model we previously defined in this chapter, combined with the usage of the loss functions and evaluation metrics we discussed.
We will predict the iris class of flowers using the dataset seen in the second recipe, Toy dataset for classification – load, manage, and visualize Iris dataset, from Chapter 2, Working with MXNet and Visualizing Datasets: Gluon and DataLoader.
Getting ready
In this recipe, we will follow a similar pattern as we did in Chapter 3, Solving Regression Problems, in the third recipe, Training for regression models, so it will be interesting to revisit the concepts of the loss function, optimizer, dataset split, epochs, and batch size.
How to do it...
In this recipe, we will create our own training loop and we will evaluate how each hyperparameter influences...