5.1 Forms of Machine Learning

Key Takeaways

  • Supervised learning trains on labeled input-output pairs and splits into classification (predefined classes) and ML regression (continuous numbers).
  • On CT-AI, ML regression means numeric prediction; it is not the change-related-defect meaning of regression used in other ISTQB syllabi.
  • Unsupervised learning trains on unlabeled data: clustering groups similar records, and association finds attribute dependencies such as market-basket patterns.
  • Reinforcement learning uses an intelligent agent that receives rewards or penalties from an environment; hard parts are environment setup, reward design, and strategy.
  • The form of ML is chosen from the available data and the task, not from which technique sounds most advanced.
Last updated: September 2026

Why the form of ML is a testing decision

Machine learning (ML) is not a single technique. ISTQB Certified Tester AI Testing (CT-AI) v2.0 learning objective AI-3.1.1 (K2) asks you to distinguish the forms of ML: supervised learning, unsupervised learning, and reinforcement learning. The exam is not asking you to name a Python library. It is asking you to read a problem and decide what kind of learning setup it is, because that decision changes the data you inspect, the oracles you can use, and the ML functional performance story you can honestly tell.

Testers who collapse every AI-based system into a classifier write the wrong acceptance criteria. A price model is not defective because it did not pick a class. A clustering model is not defective because it did not output a labeled outcome. A warehouse robot is not defective because nobody handed it a spreadsheet of correct paths. Name the form first, then decide what evidence of quality even means.

Supervised learning: a teacher column exists

In supervised learning, the algorithm trains a model from labeled data. Each training example is an input paired with a known output. The model learns a mapping: given new inputs that resemble the training inputs, produce outputs that follow the pattern of those labels.

Picture a hospital imaging project. Radiologists (or a controlled labeling process) have already marked thousands of chest images as possible pneumonia finding or no pneumonia finding. During training, the algorithm sees both the pixels and the labels. After training, a new image arrives without a label, and the model predicts a class. The labels were the teacher. If that teacher column does not exist and cannot be created, you do not have a supervised problem, no matter how many raw files you stored.

Supervised work splits into two families that CT-AI expects you to keep apart: classification and ML regression.

Classification assigns a predefined class

Classification puts an input into a predefined class. Exam-typical pictures include:

  • An email routed as spam or not spam
  • An image recognized as a product type, a defect type, or a species
  • A loan application routed as approve, refer, or decline
  • A support ticket tagged as billing, technical, or cancellation

The output is discrete. There may be two classes (binary) or more than two (multi-class). Later in the syllabus you will score class decisions with confusion-matrix metrics such as accuracy, precision, recall, and F1-score. For this section, lock the output type: a bucket, not a sliding number along a line.

From a tester’s seat, classification quality is only as honest as the class definitions. If yesterday’s spam included phishing and today’s spam excludes it, the labels drifted even though the folder name stayed the same. You are not only testing a model. You are testing whether the teacher column still means what stakeholders think it means.

ML regression predicts a continuous number

ML regression predicts a continuous numerical value. Typical stories:

  • Estimating a person’s age from lifestyle data
  • Forecasting a price
  • Predicting remaining useful life of equipment in hours
  • Estimating a wait time in minutes

The model is still supervised: each training row has an input and a numeric target. What changed is the shape of the answer. You will not get spam versus not-spam. You will get 47.2 years, $18,450, or 13.6 minutes. Error is measured as distance from a number, not as a count of class confusions.

The CT-AI trap: ML regression is not software-regression defects

This is the highest-yield wording trap in the chapter. In many other ISTQB syllabi, regression means change-related defects: you modify software and previously working behavior breaks, so you rerun old tests. In this ML chapter, ML regression is the supervised task that outputs a number.

If a question says the model predicts used-car prices from mileage and year, the form is supervised ML regression. If a question says testers reran last sprint’s tests after a pipeline change to find change-related defects, that is the other meaning of regression, and it is not ML regression. Do not let the shared English word merge two different technical ideas. CT-AI uses the qualifier ML regression on purpose so you can keep them separate.

What testers watch when labels exist

Labels are a quality object. Inconsistent annotators, mixed class definitions, and leaked future information all create models that look strong in the lab and fail in production. Supervised learning also assumes you can obtain labels at a cost the project can bear. A perfect architecture cannot rescue a teacher column that is wrong 30% of the time.

Unsupervised learning: no output labels on the rows

In unsupervised learning, the algorithm trains on unlabeled data. There is no teacher column that says this row is class A. The model infers patterns or structure from the features themselves. CT-AI typically splits this family into clustering and association.

Clustering groups similar records

Clustering groups data points by similarity. A retailer might cluster customers into groups for marketing: high-frequency bargain hunters, seasonal gift buyers, and dormant accounts. Nobody first handed the algorithm a customer-type label. The groups emerge from shared features such as recency, frequency, and basket size.

You often cannot score clustering with a simple accuracy against a gold class, because no gold class was collected. Tester questions shift: Are the groups stable when you resample? Are they interpretable to the people who will use them? Do they secretly track a sensitive proxy? A cluster that is statistically tight and commercially useless still fails the task, even if the algorithm ran cleanly.

Association finds dependencies among attributes

Association identifies relationships or dependencies among data attributes. Market-basket analysis is the usual story: shoppers who buy pasta and tomatoes often also buy basil, so the system recommends basil. The model is not classifying a shopper into a named class and not predicting a continuous price. It is reporting co-occurrence structure.

Association results can be statistically real and still operationally empty. Ice cream and sunscreen may rise together in summer because of weather, not because one product causes the other. Testers ask whether rules are actionable, whether rare but harmful associations are missed, and whether recommendations create policy problems (for example, suggesting alcohol next to products aimed at minors).

Reinforcement learning: an agent learns from the environment

Reinforcement learning (RL) does not start from a static labeled table the way classic supervised training does. An intelligent agent acts in an environment. After an action, it receives rewards (positive feedback) or penalties (negative feedback). Over many interactions it improves a strategy that increases cumulative reward.

Picture a warehouse robot. It chooses a path. Docking a pallet without a collision yields a reward. Clipping a rack yields a penalty. There may be no file that lists every correct path in advance. The agent learns from interaction, including from mistakes that would be unacceptable if they happened on a live factory floor without a simulator.

CT-AI highlights three practical challenges:

  1. Environment setup — The simulator or real world must expose the states and actions that matter. A driving simulator that never rains will not teach rain behavior. Testers treat environment fidelity as a test object, not as scenery.
  2. Reward design — Agents exploit loopholes. Reward distance traveled and a vehicle may spin in circles. Reward a customer-satisfaction score and a chatbot may agree with unsafe advice to keep the score high. The reward function is a specification, and specifications can be wrong.
  3. Strategy selection — Choosing how the agent explores, how long it trains, and which algorithm family it uses changes whether you get a brittle shortcut or a robust policy.

Applications the syllabus expects you to recognize include robotics, autonomous vehicles, and adaptive systems such as chatbots that improve from feedback while they interact.

RL testing is unusually sensitive to unsafe actions during learning, to the gap between simulation and production, and to whether the deployed policy still matches the environment it was trained in. A chatbot that learned in a sandbox of polite users may behave differently when real users try to jailbreak it.

Choose the form from data and task

No form is more AI than another. The choice depends on the nature of the available data and the specific task. Translate the story before you name the technique.

If you have…And you need…Typical form
Labeled pairs and discrete targetsAssign a classSupervised classification
Labeled pairs and numeric targetsPredict a numberSupervised ML regression
Unlabeled records and group structureSegments or typesUnsupervised clustering
Unlabeled records and co-occurrenceRules or recommendationsUnsupervised association
An interactive environment and a reward signalA policy for actionsReinforcement learning

Exam items will hide the form inside a narrative. Ask four questions in order: Are labels present? Is the desired output a class or a number? Is the system grouping records or finding associations? Is an agent receiving rewards while it acts? Answer those, then pick the form. That translation is the K2 skill AI-3.1.1 is testing.

Loading diagram...
CT-AI forms of machine learning
Test Your Knowledge

A used-car site trains a model on listings that include mileage, year, and the final sale price in dollars. New listings should receive a predicted price. Which form of ML is this?

A
B
C
D
Test Your Knowledge

A teammate says ML regression on CT-AI is the same idea as regression in other ISTQB syllabi, because both involve going backward over previous work. Which statement correctly separates the two uses?

A
B
C
D
Test Your Knowledge

A warehouse robot chooses driving actions in a simulator. It receives a reward when a pallet is placed without collision and a penalty when a rack is hit. No labeled correct-path dataset is supplied in advance. Which form of ML is this?

A
B
C
D