Skip to content

Supervised learning

Also called: supervised machine learning

Published:

How does supervised learning work?

Each training example has two parts: the features the model uses as input, and the label, which is the value it should predict [1]. In a rainfall model, temperature, humidity and wind direction are features, and the amount of rain is the label [1].

During training the model makes a prediction, compares it with the actual value, and adjusts itself according to the difference, known as the loss. Repeated across the dataset, this teaches it the relationship between features and label [1]. The model is then tested on labelled data held back for the purpose. Once it performs well, it moves on to making predictions for new, unlabelled examples [1].

What tasks is it used for?

Google names two common tasks: regression, which predicts a number, and classification, which picks a category [3]. Estimating a house price is regression; deciding whether an email is spam is classification [3]. The spam filter IBM describes is trained on messages labelled as spam or legitimate, and learns to sort new messages into one of the two [2].

What are its weak points?

Building a labelled dataset usually means labelling by hand, which is slow and costly [2]. Diversity matters as much as size. In Google's example, a model trained on a hundred years of July weather alone won't predict January rainfall well [1].

Frequently asked questions

What is a label in supervised learning?

It is the correct answer the model is meant to predict, such as the actual rainfall recorded for a given day.

How is it different from unsupervised learning?

Supervised learning trains on labelled examples. Unsupervised learning has no labels and looks for patterns in the data on its own.

Sources

  1. Supervised Learning — Google for Developers
  2. What Is Supervised Learning? — IBM
  3. What is Machine Learning? — Google for Developers