Defining loss functions and evaluation metrics for classification
In the previous recipe, we defined our input features, described our model, and initialized it. At that point, we passed a features vector of a flower to predict its iris species, calculated the output, and compared it against the expected class.
We also showed how those preliminary results did not represent a proper evaluation. In this recipe, we will explore the topic of evaluating our classification models.
Furthermore, we will also understand which loss functions fit best for the binary and multi-label classification problem.
Getting ready
Loss functions and evaluation functions need to satisfy the same properties that are described in Chapter 3, Solving Regression Problems, in the second recipe, Defining Loss functions and evaluation metrics for regression; therefore, I recommend reading that chapter first for a more thorough understanding.
We will start developing our topics by analyzing the binary...