Machine learning problems can be divided into two main categories:
The difference depends on whether we have labeled data.
In supervised learning, each training example includes:
The model learns a mapping from inputs to outputs.
In other words:
We know the correct answer during training.
Supervised learning problems are divided into: - Regression (continuous output) - Classification (discrete output)
The model tries to:
Supervised learning is goal-oriented: we explicitly define what we want to predict.
In unsupervised learning, the dataset contains:
There is no “correct answer” provided.
The model tries to discover patterns, structure, or relationships within the data.
The model may try to:
Unsupervised learning is exploratory: we do not specify a prediction target.
Supervised Learning: Input (X) —> Model —> Known Target (y)
Unsupervised Learning: Input (X) —> Model —> Discovered Structure
Use supervised learning when: - labeled data is available - a clear prediction goal exists
Use unsupervised learning when: - labels are unavailable - the objective is exploration - you want to understand the structure of the data
Understanding whether a problem is supervised or unsupervised:
It is one of the first decisions in any machine learning project.