Classification task#

Classification#

A classification task is for categorizing images into classes. Classes are assigned using a text label. These labels are applied to a whole image, meaning you typically assign one label per image. To illustrate an application of this task, think of an image containing a cat or a dog. You are to label the image, either as “cat” or “dog”. Based on your input, the system will train a model that will be able to predict if the image contains a dog or a cat.

Examples of leveraging classification#

You can use classification in several ways. Below, you’ll find a few examples where classification is applied:

  • E-mail Applications: spam detection and automatic categorization of received e-mails

  • Finance: fraud detection, risk assessment

Types of classification#

We can divide classification into several types of classification tasks:

  • Binary classification

  • Multi-class classification

  • Multi-label classification

  • Hierarchical classification

Binary classification#

When you use only two labels to annotate your dataset, you are applying the method of binary classification. As the name suggests, you have two labels to choose from and can only apply one. So, assigning labels “cat” or “dog” to images of animals is a binary classification task. Even with one label defined, you are still leveraging binary classification.

Multi-Class Classification#

When you use more than two labels to annotate your dataset, you are applying the method of multi-class classification. For comparison, with binary classification you have one or two labels to choose from. With multi-class classification you can have multiple options. Let’s use an example of classifying images of animals, be it a “dog”, “cat”, or “panda”. When you are presented with an image of a panda, you can classify it as one of “dog”, “cat”, and “panda”. The image cannot be both annotated as “dog” and “panda” - only one label per image is allowed.

Multi-label Classification#

When you use more than two labels to annotate your dataset and the source of annotation belongs to more than one category, you are applying the method of multi-label classification. For comparison, in multi-class classification, labels are mutually exclusive and only one label out of many can be assigned to an image. However, in multi-label classification, you can assign multiple labels to the same image.

Hierarchical Classification#

Hierarchical classification is the grouping of labels into a taxonomy. As human beings, we intuitively know that the Yorkshire Terrier is a dog and the dog is a pet, and the pet is an animal. Contrarily to humans, machines must be taught how to classify an object and what group it belongs to. That’s what you can use hierarchical classification for. You can create a hierarchy tree with labels.

The reasons why you would need to use hierarchical classification:

  • to distribute your workforce of annotators who have various degrees of knowledge from laymen to experts

Imagine having the task of classifying dogs. A very simple task for each of us. However, at some point you may want to classify dog breeds. This takes more specialized, in-depth, knowledge to identify dog breeds. One of the ways to do this is through hierarchical classification. Hence, starting with a general concept and narrowing it down when needed. This will extend your model and solve more of your problems.

  • to facilitate the breakdown of your problem

  • to extend your solution to other areas