Hierarchy of binary classifiers for multiclass classification

Mohit Sharma

Mohit Sharma

Windsor, Ontario

0 0
  • 0 Collaborators

For a multiclass classification task, the idea behind using hierarchy of binary classifiers is that the set of classes in training data has similar number of examples for a pair of groups of classes. ...learn more

Project status: Published/In Market

Artificial Intelligence

Groups
DeepLearning

Intel Technologies
Intel CPU

Code Samples [1]

Overview / Usage

For a multiclass classification task, consider nine output classes 1 to 9 with following number of datapoints in training data:

1: 9118, 2: 24431, 3: 14798, 4: 4704, 5: 3064, 6: 51811, 7: 14769, 8: 51763, 9: 25542

The idea behind using hierarchy of binary classifiers is that the number of datapoints for the set of classes in training data are similar for different pair of classes. For eg.

  • Class_6 51811 & Class_8 51763
  • Class_9 25542 & Class_2 24431
  • Class_3 14798 & Class_7 14769
  • Class_1 9118
  • Class_4 4704 & Class_5 3064

So, these classes can be grouped for comparable datapoints and a binary classifier can be used to classify between 2 groups. Then, using a hierarchy of binary classifiers can be built as shown in the image below to classify between individual classes:

The class probabilities are predicted as a multiplication of probabilities predicted by the individual classifiers for belonging to a set of classes as follows:

P['Class_4'] = P['Class_9273145'] * P['Class_73145'] * P['Class_45'] * P['Class_4']

P['Class_2'] = P['Class_9273145'] * P['Class_92'] * P['Class_2']

and similarly for other classes.

Methodology / Approach

Tensorflow framework is used for implementing the hierarchy of binary classifiers which classifies between two groups of classes with similar number of datapoints.

Technologies Used

Python, Tensorflow, Jupyter notebook

Repository

https://www.kaggle.com/code/mohit12562/hierarchy-of-binary-classifiers

Comments (0)