* Total Points: 0
Back to Lessons Classification vs. Regression vs. Clustering 0 pts Module 1 · Lesson 3
Introduction

Classification vs. Regression vs. Clustering

The question you ask determines what the machine does

The Setup

In Lesson 2, you learned three paradigms -- supervised, unsupervised, and reinforcement. That tells you how the machine learns.

But within supervised learning alone, there are two fundamentally different tasks. And unsupervised learning has its own. The task type determines what the model outputs, how you evaluate it, and what clinical decisions it can support.

Same dataset, three different questions

You have a registry of 5,000 patients who underwent lower extremity bypass. Same patients. Same variables. But the question you ask completely changes the task:

Question 1: "Will this patient need a major amputation within 2 years?" -- The answer is yes or no.
Question 2: "How many days will this patient stay in the hospital?" -- The answer is a number.
Question 3: "Are there natural subgroups of patients with similar risk profiles?" -- There is no predefined answer.

Same data. Three different questions. Three different task types. The question you ask determines what the machine does -- and how you judge whether it did it well.

The Three Task Types

Every ML model does one of these three things. Tap each card for details.

Classification
The model predicts a category. The output is a label, not a number.
Supervised
What it does
The model assigns each patient to one of a set of predefined categories. Binary classification has two categories (yes/no, dead/alive, patent/occluded). Multi-class classification has three or more (WIfI stage 1, 2, 3, 4).
What you already know
Logistic regression is classification. It predicts the probability of a binary outcome. ML classification models (random forest, XGBoost, neural networks) do the same thing -- they just use more flexible algorithms to learn the mapping from features to category.
How you evaluate it
Accuracy, sensitivity, specificity, AUC-ROC, positive predictive value. These are the metrics from Module 8. If the paper does not report at least AUC and calibration, be skeptical.
Vascular example: An XGBoost model predicting major amputation (yes/no) within 1 year after infrainguinal bypass. Features = WIfI stage, runoff score, diabetes status, dialysis, tissue loss severity. Output = probability of amputation (0 to 1), thresholded to a yes/no prediction.
Tap to expand
Regression
The model predicts a number. The output is continuous, not a category.
Supervised
What it does
The model outputs a continuous value -- a number on a scale. Length of stay in days. Estimated blood loss in milliliters. Ankle-brachial index at 6 months. The prediction is not a label; it is a point on a number line.
What you already know
Linear regression is regression. You have done this -- predicting a continuous outcome from a set of predictors. ML regression models use the same concept with more flexible algorithms that can capture nonlinear relationships and interactions.
How you evaluate it
Mean absolute error (MAE), root mean squared error (RMSE), R-squared. These measure how close the predicted number is to the actual number. An R-squared of 0.7 means the model explains 70% of the variation in the outcome.
Vascular example: A random forest model predicting postoperative length of stay (in days) after open abdominal aortic aneurysm repair. Features = age, ASA class, aneurysm diameter, operative time, estimated blood loss. Output = predicted LOS (e.g., 6.3 days).
Tap to expand
Clustering
The model finds natural groups. There is no predefined answer.
Unsupervised
What it does
The model groups similar patients together without being told what the groups should look like. There is no outcome column. The algorithm discovers structure in the data -- patient phenotypes, trajectory patterns, comorbidity profiles -- that you did not define in advance.
What you already know
Clinical phenotyping is clustering done by expert intuition. When you recognize that "these CLTI patients fall into a few distinct patterns," you are clustering informally. Algorithms like k-means and hierarchical clustering formalize that process and do it across thousands of patients simultaneously.
How you evaluate it
There is no "right answer" to check against, so you cannot use accuracy or AUC. Instead: silhouette score (do clusters separate cleanly?), reproducibility (do you get the same clusters in a different sample?), and most importantly, clinical actionability (do the clusters mean something useful?).
Vascular example: K-means clustering applied to 6,000 PAD patients using 30 comorbidity variables. The algorithm identifies 4 phenotypes: (1) metabolic-dominant (diabetes, obesity, CKD), (2) cardiac-dominant (CAD, CHF, atrial fibrillation), (3) smoking-dominant (minimal comorbidities, heavy tobacco use), (4) low-risk (few comorbidities, younger age). These groups were not predefined -- the algorithm found them.
Tap to expand
!

How This Connects to Lesson 2

Classification and regression are both supervised -- they need labeled outcomes. The difference is whether that outcome is a category or a number. Clustering is unsupervised -- no outcome column at all.

Lesson 2 told you how the machine learns. This lesson tells you what the machine outputs.

Why This Matters When You Read a Paper

The task type determines how you judge whether the model is any good.

Quick comparison

Classification Regression Clustering
Output Category Number Group assignment
Paradigm Supervised Supervised Unsupervised
Key metrics AUC, sensitivity, PPV MAE, RMSE, R² Silhouette, clinical validity
Clinical question "What will happen?" "How much / how long?" "What types exist?"
Traditional equivalent Logistic regression Linear regression Phenotyping (informal)

The Rosetta Stone: What Authors Write vs. What They Did

Continuing from Lesson 1 -- here is how to decode the methods section through the lens of task types.

Classification
"We developed a model to predict 30-day mortality after EVAR"
The outcome is binary (died / survived) -- this is classification. Look for AUC, sensitivity, and calibration in the results. If they only report accuracy, be cautious -- accuracy is misleading when events are rare.
Regression
"Our model estimates intraoperative blood loss for complex aortic reconstruction"
The outcome is a continuous number (milliliters of blood loss) -- this is regression. Look for MAE and R-squared. A model that "explains" 30% of the variation in blood loss may not be useful enough to change practice.
Clustering
"Unsupervised analysis identified four distinct phenotypes among patients with CLTI"
No outcome was used as input -- this is clustering. Ask: Were the clusters reproduced in a validation cohort? Do they predict different outcomes? Would knowing the cluster assignment change your management?

The Discretization Trap

Some authors take a continuous outcome and chop it into categories. "Prolonged length of stay (>7 days) -- yes or no" turns a regression problem into a classification problem. This can be valid (clinically, you may care more about "prolonged vs. not" than the exact number), but it also throws away information. When you see this, ask: did they choose the cutoff based on clinical relevance, or did they just pick the median?

Clustering Then Predicting

A common two-step approach: first cluster patients (unsupervised), then predict outcomes within clusters (supervised). The overall paper uses both task types. The question is which step answers the primary research question -- discovery of subgroups (clustering) or prediction of outcomes (classification/regression). If they skip straight to reporting cluster-specific survival curves without validating the clusters themselves, the discovery step was never properly evaluated.

The first question when reading any ML paper: is the model predicting a category, predicting a number, or finding groups? This tells you which metrics to look for and what kind of validation to expect.

Exercise: Name That Task

Read the study description. Identify the task type: classification, regression, or clustering.

Study 1 of 4

Lesson Complete!

0
Total Points Earned
Studies (0/4 correct) +0 pts
Lesson Completed +100 pts

Classification vs. Regression vs. Clustering

Module 1 - Lesson 3 complete

Key Takeaways

  • Classification predicts a category: Binary (yes/no) or multi-class. Evaluate with AUC, sensitivity, specificity, calibration. This is the ML version of logistic regression.
  • Regression predicts a number: A continuous value on a scale. Evaluate with MAE, RMSE, R-squared. This is the ML version of linear regression.
  • Clustering finds groups: No predefined outcome. Evaluate with silhouette score, reproducibility, and clinical actionability. Generates hypotheses, not predictions.
  • The question determines the task: Same dataset can support classification, regression, or clustering depending on what you ask. Framing the question correctly is a research decision, not a technical one.
  • Task type determines evaluation: You cannot use AUC to evaluate a regression model or RMSE to evaluate clusters. The task type dictates which metrics matter -- and which to demand when reviewing a paper.

You now have two layers of ML literacy. Lesson 2: how does the machine learn? (supervised, unsupervised, reinforcement). This lesson: what does the machine output? (category, number, group). Next up -- what goes into the machine.