In the previous section, you learned that ML helps machines learn from data to make predictions or decisions. Just like students can learn with the help of a teacher or by exploring on their own, machines can also learn in two main ways, i.e., Supervised Learning and Unsupervised Learning.
6.2.1 Supervised Learning
In supervised learning, the machine is given data with correct answers (labels). It learns by comparing its own guesses with the correct answers and its learning improves over the time.
Definition: Supervised learning is when the machine is trained using labeled data, where both instance and correct output are provided.
Example 1: Suppose you are training a machine to predict whether a fruit is an apple or a mango. You show the machine many Apples and Mangoes and label it as that
"This is an Apple" "This is a Mango"
The computer learns from these examples. Later, it can predict with high accuracy when shown a picture of apple and mangoes such pictures.
Example 2: A system can be trained based on marks and attendance of students to predict who might fail.