Supervised learning is a type of machine learning algorithm that uses a known dataset (labeled data) to make predictions. The dataset contains input data and the corresponding desired output labels. The algorithm uses the input data to learn the mapping function from the input to the output, which can then be used to make predictions on new data.
For example, supervised learning can be used to create a classification model that can predict whether an email is spam or not. The model is trained on a dataset of emails that are already labeled as spam or not. The model then learns to recognize patterns in the emails that indicate whether they are spam or not.
Unsupervised learning is a type of machine learning algorithm that uses an unlabeled dataset to make predictions. The algorithm attempts to find patterns in the data without any prior knowledge or labels. It is an exploratory technique used to uncover hidden structures in data.
For example, unsupervised learning can be used to cluster a dataset of customer profiles into distinct groups. The algorithm would analyze the data and attempt to identify patterns in the data that indicate which customers belong to which group.