Skip to content
Machine Learning

What is supervised learning?

Machine learning that learns from labeled data: examples paired with the correct output. Classification predicts a category and regression a number; common algorithms include linear and logistic regression, decision trees, random forests, gradient boosting, SVMs, k-nearest neighbors and neural networks.

datasciencetrivia.com

Card 1 of 271. Answer: Machine learning that learns from labeled data: examples paired with the correct output. Classification predicts a category and regression a number; common algorithms include linear and logistic regression, decision trees, random forests, gradient boosting, SVMs, k-nearest neighbors and neural networks.

Created by santiviquez

About · Quizzes · History of AI · To suggest new questions or report an error send me a dm.

The longer answer

Supervised learning is the type of machine learning that learns from labeled data: every training example comes with the correct output, the label, and the algorithm learns a mapping from inputs to outputs that it can then apply to new, unlabeled inputs. When the label is a category, such as spam or not spam, the task is classification; when it is a number, such as a house price, it is regression.

Common supervised algorithms are linear regression, logistic regression, decision trees, random forests, gradient boosting, support vector machines, k-nearest neighbors, naive Bayes and neural networks. A strong answer spans families and tasks: logistic regression classifies despite its name, linear regression predicts numbers, and trees, KNN, SVMs and neural networks can do both. Regression on its own names a task, not an algorithm, and k-means and PCA are a classic trap: they use no labels, so they are unsupervised.

Take spam filtering, with emails labeled spam or not spam. Logistic regression learns a weight for each word and turns the weighted sum into a probability. A decision tree learns yes-or-no questions, such as whether the email contains "free". A support vector machine finds the boundary with the widest margin between the classes. Naive Bayes multiplies per-word probabilities, assuming words are independent given the class.

Supervised learning contrasts with unsupervised learning, which finds structure in unlabeled data; semi-supervised learning, which mixes a few labels with many unlabeled examples; and reinforcement learning, which learns from rewards instead of labels. Self-supervised learning, used to pretrain large language models, creates its labels from the data itself, for example by predicting the next word. Interviewers then ask how to choose an algorithm: data size, interpretability, training cost and the type of data all matter.

All questions