training deep leaning models classification metrics the model development process typically starts by formulating clear problem definition this basically involves defining the input and the output of the model and the impact (usefulnesssuch model can deliver an example of such problem definition is the categorization of product images into product categories--the input to such model being product images and the output being product categories such model might aid the automated categorization of products in an ecommerce or online marketplace setting having defined the problem definitionthe next task is to define the performance metrics the key purpose of performance metrics is to tell us how well our model is doing simple metric of performance may be accuracy (orequivalentlythe error)which simply measures the disagreements between the expected output and the output produced by the model accuracyhowevercan be poor measure of performance the two main reasons are class imbalance and unequal misclassification costs let' look at the class imbalance problem with an example as subproblem of the problem in our previous example of product classificationconsider the case of distinguishing between mobile phones and their accessories the number of examples for classes of mobile phones is lot smaller that the classes of mobile phone accessories iffor example of the examples are mobile phone accessories and are mobile phonesan accuracy of can be simply acquired by predicting the majority class thusaccuracy is poor choice of metric in this example let' now understand the problem of unequal misclassification costsagain by considering an example related to the problem of product classification consider the error associated with categorizing food products that are allergen-free (not containing the eight top allergens-namelymilkeggsfishcrustacean shellfishtree nutspeanutswheatand soybeanversus the rest (non-allergen-freefrom buyer' point of viewas well as business point of viewthe error associated with