ML Fundamentals: lesson 2 of 7

ML Fundamentals

PATH 02MODULE 01LESSON 02 OF 07Next: Features, Targets, and Samples

Types of Machine Learning

Recognize the broad learning setup that matches a real-world machine learning problem.

Beginner14 min readmachine-learningsupervised-learningunsupervised-learningreinforcement-learning

Concept

Machine learning problems are commonly grouped by what feedback the system receives. The three useful beginner categories are supervised learning, unsupervised learning, and reinforcement learning.

Supervised Learning

Supervised learning uses examples with a known outcome. A house dataset can include size and a known sale price; a churn dataset can include customer behavior and a known churn label. The model learns from inputs and outcomes, then predicts an outcome for new inputs. Regression predicts a number, such as revenue. Classification predicts a category, such as churn or no churn.

Unsupervised Learning

Unsupervised learning has no explicit target to predict. It looks for structure, such as customer groups with similar behavior or a smaller set of dimensions that summarizes many numeric features. A retailer might cluster customers for exploratory segmentation, but the resulting groups still need business interpretation.

Reinforcement Learning

Reinforcement learning concerns sequential decisions. An agent takes actions in an environment and receives rewards or penalties. A system learning a sequence of actions in a game or resource-allocation setting is conceptually different from predicting churn for one customer row. It is introduced here for orientation, not as an algorithm to implement in this track.

Choosing a Setup From the Available Information

Start with the evidence, not the label. For churn prediction, historical customer rows include a known later outcome: churned or stayed. The desired output is a future class or risk score, so this is supervised classification. For house prices, past homes have known sale prices and the output is a number, so it is supervised regression.

Customer segmentation starts differently. A company may have purchase frequency, spend, and browsing behavior but no agreed segment label. It can look for groups, which is an unsupervised task, then decide whether the groups are meaningful enough to use. Anomaly exploration can be similar: unusual transactions may be worth investigating even when confirmed fraud labels are incomplete.

Finally, consider sequential control. A delivery-routing system chooses an action, sees how the environment changes, and receives a reward for a safe, efficient route. That feedback loop is why it is conceptually closer to reinforcement learning than a one-time prediction.

QuestionSupervisedUnsupervisedReinforcement
Historical feedbackKnown outcomeNo explicit targetReward after actions
Typical outputNumber, class, or scoreGroups or structureAction policy
ExamplePredict churnExplore customer groupsChoose routes

Choosing a Setup

Ask what feedback exists. “Predict next month’s sales from past records” is supervised regression. “Group customers without a pre-existing segment label” is unsupervised learning. “Choose actions over time to maximize a reward” is reinforcement learning. Real systems can combine ideas, and not every business problem needs ML at all.

Data Science Perspective

This track focuses on supervised learning first because it supports many practical prediction tasks and provides the vocabulary needed for evaluation. Unsupervised learning appears later after learners understand features and model validation.

Failure Signals

Common Mistakes

  1. Calling any analysis without a target unsupervised ML.
  2. Treating a cluster as a verified customer segment.
  3. Using reinforcement learning for a one-time prediction task.
  4. Choosing a category before clarifying the decision.

Interview Perspective

Question: Is customer segmentation supervised learning? Answer: not when no target labels exist; it is commonly an unsupervised clustering task. What the interviewer is testing: whether you can reason from labels and desired output rather than repeat a definition. Follow-up: what would make churn prediction supervised?

Practice Questions

  1. Classify price prediction, fraud detection, and customer clustering.
  2. A retailer has clicks and completed purchases for past visitors. What makes conversion prediction supervised?
  3. A warehouse robot receives rewards for fast, safe routes. Why is this reinforcement learning rather than regression?
  4. Why should a cluster not automatically be treated as a verified customer segment?
  5. A manager only needs total revenue by region. Why might a report be better than ML?

Quick Quiz

  1. Which setup uses labeled outcomes? Answer: supervised learning.
  2. Which supervised task predicts a number? Answer: regression.
  3. Does every problem fit one label perfectly? Answer: no.

Key Takeaway

Key Takeaways

Supervised learning predicts known outcome types, unsupervised learning finds structure without a target, and reinforcement learning optimizes sequential actions using rewards.

Next Lesson

Next, see how familiar tables become features, targets, and samples for supervised learning.

Finish this lesson on your terms

Mark it complete when you have worked through the material and are ready to move on.