Step by Step
C
Classification — predicting a discrete category
The task requires predicting which category something belongs to, out of a fixed set of possible labels.
Example: predicting spam vs. not spam is a classification task.
R
Regression — predicting a continuous number
The task requires predicting a continuous numeric value, rather than a category.
Example: predicting a house's sale price is a regression task.
C
Clustering — grouping unlabeled data by similarity
The task requires finding natural groupings in data that has no pre-existing labels, using an algorithm like K-means.
Example: segmenting customers into behavioral groups with no pre-existing correct grouping supplied is a clustering task.
D
Dimensionality Reduction — compressing features while keeping structure
The task requires reducing the number of features while preserving as much meaningful structure as possible, using an algorithm like PCA.
Example: compressing 500 correlated features down to 10 principal components that still capture 95% of the original variance is a dimensionality reduction task.
Applied Walkthrough
1
A student is given a new problem and isn't sure which family of algorithms even applies.
2
Using this framework, the first question to ask is simply: what type of output do I need?
3
If the answer is a category, the classification family applies. If it's a continuous number, regression applies. If there are no labels and the goal is grouping, clustering applies. If the goal is compressing features while preserving structure, dimensionality reduction applies.
4
Getting this first categorization wrong means potentially applying an entirely wrong family of algorithms to the problem, wasting significant time before even reaching the algorithm-selection stage within the correct family.
Exam Application
Exams frequently test this framework directly by describing a task and asking which of these four categories it belongs to — before even asking about a specific algorithm. Getting the category right is the prerequisite step before any specific algorithm choice makes sense.
⚠ Common Trap
The most common trap is jumping straight to comparing specific algorithms (like K-NN vs. SVM) before first confirming which of the four broad categories the task actually belongs to. If the fundamental category is wrong, no specific algorithm within the wrong category will work well.
✓ Quick Self-Check
1. What are the four task categories in this algorithm selection framework?
Classification, Regression, Clustering, and Dimensionality Reduction.
Tap to reveal / hide
2. What is the very first question you should ask before selecting any algorithm?
What type of output do I need? (category, number, groups, or compressed features)
Tap to reveal / hide
3. Which category does predicting a house price fall into?
Regression, since the output is a continuous number.
Tap to reveal / hide
4. Which category does grouping unlabeled customers by behavior fall into?
Clustering.
Tap to reveal / hide
5. Which category does compressing 500 features down to 10 while preserving structure fall into?
Dimensionality Reduction.
Tap to reveal / hide