Imagine teaching a small child to recognise animals using flashcards. Each card carries a picture of an animal and you tell the child its name. You show a picture of a dog and say “dog”, show a cat and say “cat”. Bit by bit the child links the pictures to the right names. Supervised learning works in exactly the same way. We give the artificial intelligence data containing inputs (the pictures) together with the correct answers (the animal names). From these “supervised” examples the model learns the rules so well that when you later show it a completely new picture of an animal, it can name it correctly on its own.
Supervised learning is the machine learning paradigm in which an algorithm learns from a dataset containing labelled examples. Each example in the training set consists of an input object (typically a feature vector) and the corresponding desired output, or label. The algorithm’s aim is to learn a mapping function able to predict the output value as accurately as possible for new, previously unseen inputs. Tasks addressed by supervised learning divide into two main types: regression, where the target value is continuous (predicting a house price, say), and classification, where the target value is discrete and represents membership of a category (recognising whether a picture shows a cat or a dog).