No Free Lunch Theorem

What are the main 3 types of ML models?

Machine learning has three main types: supervised, unsupervised, and reinforcement learning. Learn what each one does, with examples, and how they differ.

On this page
  1. Supervised learning
  2. Unsupervised learning
  3. Reinforcement learning
  4. Where the other categories fit
  5. A quick comparison
  6. How this connects to the no free lunch rule

Machine learning is usually grouped into three main types: supervised learning, unsupervised learning, and reinforcement learning. The split is about how a learner gets its experience: from labeled examples, from unlabeled data, or from rewards and penalties after it acts. A model such as a decision tree or a neural network can be used within several of these types, so the three are better thought of as learning approaches than as model types.

Supervised learning

In supervised learning, each training example comes with the right answer, called its label. Labeled data means the examples have their correct answers attached. The model learns a mapping from inputs to labels, then predicts labels for new inputs. If the label is a category, the task is classification, such as sorting email into spam or not spam. If the label is a number, the task is regression, such as estimating a house’s price from its size and location.

Unsupervised learning

In unsupervised learning, the data has no labels, so the learner looks for structure on its own. Common tasks include clustering, which groups similar items such as customers with similar buying habits, and dimensionality reduction, which compresses many features into fewer while keeping most of the useful information. Anomaly detection, which flags unusual points, is another common use.

Clustering and dimensionality reduction are good starting points if you want to name different types of unsupervised machine learning algorithms.

Reinforcement learning

In reinforcement learning, an agent takes actions in an environment and receives rewards or penalties. It learns a strategy, called a policy, that tends to earn more reward over time. Game-playing programs and robot control are classic examples. The training experience does not come from a fixed table of labeled examples. It comes from the agent’s own trial and error.

Where the other categories fit

Some sources list more types. Semi-supervised learning uses a small amount of labeled data alongside a large amount of unlabeled data. Self-supervised learning creates its training signal from the data itself, such as hiding a word and asking the model to predict it. Many large language models are pretrained this way. These are usually described as blends of, or variations on, the three main types.

A quick comparison

Type Training experience What the model learns Example
Supervised Inputs with labels A mapping from inputs to known answers Spam filtering
Unsupervised Inputs without labels Structure, such as groups or patterns Customer segmentation
Reinforcement Actions and rewards A strategy that earns more reward Game-playing agents

How this connects to the no free lunch rule

No single type or model wins on every task, which is the idea behind the no free lunch rule. The right starting point depends on the data you have and the question you need answered. With labeled examples and a clear target, supervised methods are usually the first choice. With raw data and an open question, unsupervised methods fit better. The supervised learning types with examples show how each type splits into many specific methods, each with its own assumptions.

The complete guide to no free lunch theorem

The No Free Lunch Rule in Machine Learning
Read the guide

Keep exploring

Guides from other topics

All topics →