What is the difference between Class and Label ? – Everything you need to know now

In this article we will see an efficient mnemonic to always remember what is a class and a label in classification.

In Machine Learning there are different types of approaches to solve a problem.

Among them, classification problems form a large part of the spectrum.

Unfortunately, some classification concepts are confused or misunderstood by some people.

Let’s see now how to remember these different concepts :

  • Class and Label
  • Binary classification
  • Multi-class – multi-label classification

What is a class?

Let’s take an example.

We need to predict the weather in Paris for all days of the week.

Data


Here we only want to predict how the weather will be.

For this example, we have three options: sunny, rainy, snowy.

Each day must be classified in each of these options.

Therefore it’s a classification problem.

Note that if we were to predict the temperature in °C or °F, it would no longer be a classification problem but a regression problem.

These three options (sunny, rainy, snowy) are in fact our classes.

They are the three in which we have to classify our data (the days of the week).

Classified data

Mnemonic : A class is a category in which to classify our data.

A binary classification is a classification with only two classes.

A multi-class classification is a classification with more than two classes.

What is a label?

Let’s continue our example.

Now we don’t just have to predict the weather for Paris but also for Miami and Moscow.

By the way, if your goal is to master Deep Learning - I've prepared the Action plan to Master Neural networks. for you.

7 days of free advice from an Artificial Intelligence engineer to learn how to master neural networks from scratch:

  • Plan your training
  • Structure your projects
  • Develop your Artificial Intelligence algorithms

I have based this program on scientific facts, on approaches proven by researchers, but also on my own techniques, which I have devised as I have gained experience in the field of Deep Learning.

To access it, click here :

GET MY ACTION PLAN

GET MY ACTION PLAN

Now we can get back to what I was talking about earlier.

Labeled data

Here we always want to predict how the weather will be.

BUT for the same day, we have 3 different locations. And therefore 3 possible results.

These cities are in fact our labels.

These labels allow us to differentiate our days of the week according to the city.

The classification problem is still the same but we’ll have to repeat the operation for each label.

Labeled and classified data


Mnemonic : A label is a category that allows us to differentiate (label) our data.

A multi-class multi-label classification is a classification with more than two classes and more than one label.

Note that different labels for data do not necessarily imply the same classes.

We can imagine that in New York we have 3 classes (sunny, rainy, snowy) while in London only 2 (rainy, cloudy).

Class, label and then?

In Deep Learning, you have to adapt your neural network to each of these types of classification.

Indeed, for a binary classification problem, the output layer will not be the same as in a multiclass classification problem.

An output layer implies a different activation function !

In this article, we present the type of activation function to use in each classification. A table is waiting for you at the end of the article with the summary of this knowledge.

source :

One last word, if you want to go further and learn about Deep Learning - I've prepared for you the Action plan to Master Neural networks. for you.

7 days of free advice from an Artificial Intelligence engineer to learn how to master neural networks from scratch:

  • Plan your training
  • Structure your projects
  • Develop your Artificial Intelligence algorithms

I have based this program on scientific facts, on approaches proven by researchers, but also on my own techniques, which I have devised as I have gained experience in the field of Deep Learning.

To access it, click here :

GET MY ACTION PLAN

GET MY ACTION PLAN

Tom Keldenich
Tom Keldenich

Artificial Intelligence engineer and data enthusiast!

Founder of the website Inside Machine Learning

Leave a Reply

Your email address will not be published. Required fields are marked *

This page will not stay online forever

Enter your email to receive for free

The PANE method for Deep Learning

* indicates required

 

You will receive one email per day for 7 days – then you will receive my newsletter.
Your information will never be given to third parties.

You can unsubscribe in 1 click from any of my emails.



Entre ton email pour recevoir gratuitement
la méthode PARÉ pour faire du Deep Learning


Tu recevras un email par jour pendant 7 jours - puis tu recevras ma newsletter.
Tes informations ne seront jamais cédées à des tiers.

Tu peux te désinscrire en 1 clic depuis n'importe lequel de mes emails.