Machine learning is broadly categorized by how learning signals are provided to the model. In supervised learning, models are trained on labeled data—each example pairs an input with a known correct output—and learn to predict labels for new inputs. Common supervised tasks include classification, which predicts discrete labels such as spam versus not spam, and regression, which predicts continuous values like house prices. In contrast, unsupervised learning trains on unlabeled data and requires the model to discover hidden structure such as clusters, low-dimensional manifolds, or outliers. Techniques such as k-means clustering and PCA fall into this category.
Beyond these two main paradigms, several other learning settings are widely used. Semi-supervised learning combines a small amount of labeled data with a large pool of unlabeled data, which is useful when labeling is expensive. Self-supervised learning goes further by generating its own supervision signal from the input—for example, predicting masked words or contrasting image transformations—and powers modern foundation models such as BERT and CLIP. Reinforcement learning involves an agent learning a policy by interacting with an environment to maximize a cumulative reward signal, as seen in game-playing AIs and robotics. Related paradigms include multi-task learning, where one model shares representations across several tasks, and transfer learning, where a pre-trained model is fine-tuned for a new but related task.
A practical distinction within supervised learning is between classification and regression. Classification outputs a category from a discrete set of classes, while regression outputs a real number. Logistic regression, despite its name, is a classification algorithm that uses the sigmoid function \( \sigma(x) = \frac{1}{1 + e^{-x}} \) to map a linear score into a probability between 0 and 1, applying a threshold (often 0.5) to assign a class label. Understanding which learning paradigm and task type fits a problem is the first step in any machine learning project.