← Back to Tutorials
🤖QGISAdvanced⏱️ 30 mins read

Supervised vs Unsupervised Classification

When classifying satellite imagery, you have two fundamentally different approaches: **Supervised** (you guide the process) and **Unsupervised** (the algorithm does it automatically). Choosing the right one depends on your data, time, and goals. ---

📋 Prerequisites

  • QGIS Desktop 3.22+ installed on your computer.
  • Basic understanding of GIS data concepts.

Step-by-Step Instructions

1

Understand Supervised Classification

In supervised classification, **you** define training samples for each land cover class, and the algorithm learns to classify the rest of the image based on those examples. ### Common Algorithms: - **Maximum Likelihood Classification (MLC)** – statistical, most widely used - **Support Vector Machine (SVM)** – good with limited training data - **Random Forest** – robust, handles complex data well ### Workflow: 1. Select training samples for each class (e.g., 20+ polygons per class) 2. Train the classifier on these samples 3. Apply the trained model to classify the entire image 4. Validate using independent reference points ---

2

Understand Unsupervised Classification

In unsupervised classification, the algorithm automatically groups pixels into a specified number of spectral clusters based on similarity — **no training samples needed**. You label each cluster afterward based on what it represents. ### Common Algorithms: - **K-Means Clustering** - **ISODATA (Iterative Self-Organizing Data Analysis)** ### Workflow: 1. Specify the number of clusters you want (e.g., 10) 2. Run the algorithm — it groups pixels automatically 3. Examine each resulting cluster and assign it a meaningful label (e.g., Cluster 3 = Water) 4. Merge clusters that represent the same class if needed ---

3

Compare the Two Approaches

| Aspect | Supervised | Unsupervised | |---|---|---| | **Training data needed** | Yes | No | | **User effort** | Higher (must collect samples) | Lower (automatic) | | **Accuracy control** | Higher, if samples are good | Depends on cluster interpretation | | **Best for** | Known classes, detailed mapping | Quick exploration, unfamiliar areas | | **Common tools** | SCP plugin, ArcGIS, GEE | SCP plugin, ENVI, K-Means in Python | ---

4

Run Unsupervised Classification in QGIS (via SCP)

1. Open the **Semi-Automatic Classification Plugin** 2. Go to **Band Set** and load your bands 3. Navigate to **Classification → Unsupervised Classification** 4. Set the number of desired classes 5. Click **Run** — QGIS generates a clustered raster 6. Use the **Classification Report** tool to review and relabel clusters ---

5

Which Should You Choose?

- **Use Supervised** when you know exactly what classes you need and can invest time in training samples - **Use Unsupervised** when you're exploring an unfamiliar area, need a quick first look, or lack ground-truth data Many workflows actually combine both — unsupervised classification for initial exploration, followed by a refined supervised classification. ---

🧠 Quick Recap & Practice Questions

## Quick Recap

- Supervised = user-defined training samples guide classification
- Unsupervised = algorithm auto-clusters pixels; user labels afterward
- Supervised generally gives more control and accuracy
- Unsupervised is faster and useful for exploration

---

## Practice Questions

1. What is the key difference between supervised and unsupervised classification?
2. Name one algorithm used for each approach.
3. In what situation would unsupervised classification be more practical?

---

*Next Tutorial: DEM Analysis – Slope, Aspect, and Hillshade*