CertNote/ Commute Study Notes
Roadmap
KOEN
CLF-C02 · FoundationalCloud Practitioner - Foundational
DVA-C02 · AssociateDeveloper - Associate
SAA-C03 · AssociateSolutions Architect - Associate
SOA-C02 · AssociateCloudOps Engineer - Associate
SAP-C02 · ProfessionalSolutions Architect - Professional
DOP-C02 · ProfessionalDevOps Engineer - Professional
Linux Master 2 · 2급KAIT Linux Master - Level 2
SCS-C03 · SpecialtySecurity - Specialty
Linux Master 1 · 1급KAIT Linux Master - Level 1
MLA-C01 · AssociateMachine Learning Engineer - Associate
AIF-C01 · FoundationalAI Practitioner - Foundational
  • Week 1
    • 1.The Relationship and Differences Between AI, Machine Learning, and Deep Learning
    • 2.Learning Types: Supervised, Unsupervised, and Reinforcement Learning
    • 3.Problems Where ML Fits vs. Problems Where It Doesn't
    • 4.Key Terms: Model, Training, Inference, Feature, Label, Overfitting
    • 5.Week 1 Review: AI/ML Fundamentals
  • Week 2
  • Week 3
  • Week 4
  • Week 5
  • Week 6
DEA-C01 · AssociateData Engineer - Associate
MLS-C01 · SpecialtyMachine Learning - Specialty
SQLD · 개발자SQL Developer (SQLD)

© CertNote · 주간랩스

  • About
  • Changelog
  • Contact
  • Terms
  • Privacy
← AIF-C01/Week 1/Day 2

Based on the AIF-C01 exam guide·Report an error

AIF-C01· AssociateWeek 1 · Day 2~27 min read

Day 2 - Learning Types: Supervised, Unsupervised, and Reinforcement Learning

📌 Key Takeaways

  • Machine learning has three learning types: supervised, unsupervised, and reinforcement learning.
  • Supervised learning: has answers (labels) → classification (predict a category) / regression (predict a number).
  • Unsupervised learning: has no answers → clustering (group similar items) / dimensionality reduction (reduce the number of variables).
  • Reinforcement learning: instead of answers, it receives rewards and learns the best actions through trial and error.
  • Watch out for the mix-ups: classification vs. regression comes down to whether the output is a category or a number; classification vs. clustering comes down to whether answer labels exist.

Learning Types at a Glance

Machine learning is divided by "how it learns." There are two forks in the road: whether there are answers (labels) and how the learning signal is received.

Learning typeAnswers (labels)Key questionRepresentative tasks
Supervised learningPresent"How do we learn to predict when the answers are known?"Classification, regression
Unsupervised learningAbsent"How do we find hidden structure without answers?"Clustering, dimensionality reduction
Reinforcement learningReplaced by rewards"How do we learn the best actions through trial and error?"Control, games, robotics

1. Supervised Learning

  • It learns from data in which inputs and answers (labels) are given together. Think of it as a "teacher teaching while providing the correct answers."
  • Example: if you train a model on dog and cat photos that each come with their answer, the model can look at a new photo and predict which one it is.
  • Supervised learning is divided into two types: classification and regression.

Classification

Used when the answer is one of a fixed set of categories (kinds). The output is a category.

  • Is an email spam or not (2 categories)
  • Is the animal in the photo a dog, a cat, or a bird (multiple categories)
  • Is a credit card transaction legitimate or fraudulent

Regression

Used when the answer is a continuous numeric value. The output is a quantity.

  • What will tomorrow's temperature be
  • What is the expected price of this house
  • What will next month's sales be

The easiest way to tell classification and regression apart is to ask: "Is the output a category or a number?" "Spam / legitimate" is classification; "price prediction" is regression.

2. Unsupervised Learning

  • It finds hidden structure or patterns on its own in data that has no answers (labels). It is like being told to "organize this data without an answer key."

Clustering

  • The task of automatically grouping similar data together. It differs from classification in that there are no predefined answer groups.
  • Automatically sorting customers into similar groups based on their purchasing tendencies
  • Automatically grouping news articles by topic
  • Example: if you say "split the customers into 3 groups," the model groups similar people together without being told in advance who belongs to which group.

Dimensionality Reduction

  • The task of reducing the number of variables while keeping as much of the important information as possible, when the data has too many features (variables).
  • It simplifies the data and makes it easier to visualize.

💡 Related theory: Classification (supervised) and clustering (unsupervised) are easy to confuse because "both split data into groups." The decisive difference is whether answer labels exist. Classification sorts into groups that have answers; clustering groups similar items without answers.

3. Reinforcement Learning

  • It learns through trial and error and rewards.
  • Instead of giving the answer directly, it gives a reward when the result of an action is good and a penalty when it is bad, so the learner gradually picks better actions.
  • It is similar to "training a puppy by giving it a treat when it does well."
TermMeaningAnalogy
AgentThe entity that learns and actsThe game player
EnvironmentThe world the agent interacts withThe game screen
ActionA choice the agent makesPressing a button
RewardA score for an action (good/bad)Gaining or losing points
  • Typical examples: game AI (Go, chess), robot control, autonomous driving control.

Reinforcement learning has no pre-prepared answer data. Instead, the agent interacts with the environment and learns an action strategy that maximizes the rewards it receives. This is fundamentally different from supervised and unsupervised learning.

Comparing the Three Learning Types: Examples

Even with the same "customer data," the learning type changes depending on the goal.

GoalLearning typeReason
Predict whether this customer will churn (yes/no)Supervised (classification)Learns from past churn outcomes (the answers)
Predict this customer's spending next monthSupervised (regression)Predicts a numeric value
Group similar customers togetherUnsupervised (clustering)Groups by similarity without answers
Learn the best recommendation order per customer from rewardsReinforcement learningLearns a strategy through trial and error and rewards

Start with the Data: Does It Have Labels?

The first question when choosing a learning type is not the algorithm but whether the data you have right now comes with answers attached.

Data you haveWhat it is calledLearning you can useExample
Every input has an answer attachedLabeled dataSupervised learning100,000 emails marked "spam / legitimate"
Only inputs, no answersUnlabeled dataUnsupervised learningA customer list with only accumulated purchase records
Instead of data, an environment to try things in(an environment, not a dataset)Reinforcement learningA robot arm simulator, a game
  • Labels do not appear on their own. People attach them (labeling, covered in Week 2 Day 4) or they come from past records. A record saying "this customer actually canceled" is itself a label.
  • That is why the biggest cost of supervised learning is usually getting the labels, and the advantage of unsupervised learning is that you can start right away without labels.

Comparing the Three Types by Cost and Validation

Comparison axisSupervised learningUnsupervised learningReinforcement learning
What you needInputs + answer labelsInput data onlyAn environment + reward rules
Biggest burdenObtaining labelsInterpreting what the results meanHuge amounts of trial and error (time, compute)
How to check it did wellCompare against the answersNo answers, so a person looks at the results and judgesCheck whether cumulative reward is growing
OutputA model that predicts the answer for new inputsGroups, reduced variables, unusual dataAn action strategy that decides what to do in each situation
  • Clustering results have no names. The model just splits the data into "group 1, 2, 3"; whether a group is the "thrifty customer" type or the "impulse buyer" type is something a person looks at and labels.
  • Another use of unsupervised learning is anomaly detection: picking out items far from most of the data. Even without a "fraud" label, you can find "transactions that differ from the usual."
  • Because it is hard to do trial and error directly in the real world where failure is costly (real roads, real factories), reinforcement learning is often trained first in a simulation environment.

How Reinforcement Learning Works

1. The agent observes the current state        (robot vacuum: there is a wall ahead)
        ↓
2. It picks one action                         (turn left)
        ↓
3. The environment returns a reward and the next state   (no collision +1 / collision -5)
        ↓
4. It adjusts its strategy to choose high-reward actions more often
        ↓
   Go back to 1 and repeat countless times
  • This "rulebook of what to do in each situation" is called a policy. The goal of reinforcement learning is to find the policy that maximizes the total reward collected to the end, not a single reward.
  • Difference from supervised learning: supervised learning tells you "the answer for this situation is this" every time, whereas reinforcement learning tells you only a score after you have tried. It never tells you what the right answer was.

Identifying the Type from Scenarios

ScenarioAnswerReasoning
Decide whether a product review is positive or negative (past reviews are marked)Supervised / classificationLabels exist, output is a category
Predict next week's order volume per storeSupervised / regressionOutput is a continuous number
Judge "yes/no" whether a loan applicant will defaultSupervised / classificationEven if the model outputs a probability of 0.87, the final answer is a category
Split unlabeled survey respondents by tendencyUnsupervised / clusteringThere are no predefined answer groups
Boil a 200-question survey down to a few core tendency axesUnsupervised / dimensionality reductionReduces the number of variables
Find unusual values from equipment sensors that contain only normal recordsUnsupervised / anomaly detectionFinds outliers without labels
A warehouse robot learns the fastest collision-free routeReinforcement learningRepeated action → reward
Identify whether the animal in a photo is a dog, cat, or birdSupervised / classification (multi-class)Still classification even with three or more categories

Correcting Common Misconceptions

  • "If the output is a number, it is regression" → It is regression only when the magnitude of the number has meaning. A postal code or a grade code (1 = legitimate, 2 = spam) is a category even though it is written as a number, so it is classification.
  • "Two categories means classification, many categories means clustering" → The number of categories is irrelevant. Two is binary classification and three or more is multi-class classification; the difference from clustering is still whether labels exist.
  • "Unsupervised learning needs no people" → Only the learning needs no answers; judging whether the resulting groups are useful and naming them is still a person's job.
  • "Reinforcement learning reward = supervised learning label" → A label is the answer itself, whereas a reward is the score for the action just taken. You only receive a reward by performing the action.
  • "We have a little answer data, so it must be supervised learning" → If there are too few labels, the model will not learn properly. A common order is to explore the structure with clustering first, add more labels, and then move on to classification.

📖 Glossary

  • Label: The answer attached to the data in advance, such as "this photo is a cat."
  • Supervised learning: A method that gives problems together with answers for the model to learn from. It is like a teacher teaching while providing the answers.
  • Unsupervised learning: A method that gives only data without answers and has the model find hidden structure on its own.
  • Reinforcement learning: A method that gives a reward for doing well and a penalty for doing badly, so the model picks up the knack through trial and error.
  • Classification: A task used when the answer is "one of a fixed set of kinds." Spam / legitimate, dog / cat / bird.
  • Regression: A task used when the answer is a continuous number, as in "how much?" Predicting price or temperature.
  • Clustering: The task of automatically grouping similar data together without answers.
  • Dimensionality reduction: The task of reducing the number of variables (features) while keeping the important information, when there are too many.
  • Agent: In reinforcement learning, the entity that actually acts and learns. In a game, the player.
  • Reward: In reinforcement learning, the score that tells whether the action just taken was good or bad.

📝 Practice Questions

Click a choice to reveal the answer and explanation.

Question 1

Which approach trains a model on input data given together with answers (labels), so that the model learns to predict those answers?

Question 2

You want to take a house's floor area, number of rooms, and so on as input and predict the "expected sale price (a number in KRW)." Which task is the most appropriate?

Question 3

You want to automatically group customers with similar tendencies from customer data that has no answer labels at all. Which task is the most suitable?

Question 4

Which best describes how reinforcement learning learns?

Question 5

What is the most essential difference between classification (supervised) and clustering (unsupervised)?

PreviousThe Relationship and Differences Between AI, Machine Learning, and Deep LearningWeek 1 · Day 1Next Problems Where ML Fits vs. Problems Where It Doesn'tWeek 1 · Day 3

Official references

  • AIF-C01 official exam page(opens in a new tab)

On this page

  • Key Takeaways
  • Learning Types at a Glance
  • 1. Supervised Learning
  • Classification
  • Regression
  • 2. Unsupervised Learning
  • Clustering
  • Dimensionality Reduction
  • 3. Reinforcement Learning
  • Comparing the Three Learning Types: Examples
  • Start with the Data: Does It Have Labels?
  • Comparing the Three Types by Cost and Validation
  • How Reinforcement Learning Works
  • Identifying the Type from Scenarios
  • Correcting Common Misconceptions
  • Glossary
  • Practice Questions