Cert EspressoLearn. Practise. Find your flow.

A LITTLE FOCUS.
A BIG NEXT STEP.

Your pace. Your space.
Oracle · OCI AI Foundations

Unsupervised and reinforcement learning

OCI AI Foundations · Lesson 3 of 16 · 14:36

YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗

Learning with these videos? Subscribe for new courses and exam-style questions.

In this lesson

Prepare for the Oracle Cloud Infrastructure AI Foundations Associate exam (1Z0-1122-26). In this lesson: unsupervised learning with no labels, how clustering works (similarity, distance measures, outliers, and uses like market segmentation), reinforcement learning (agent, environment, rewards, and policy), and how to choose the right type of learning. Includes three original practice questions, with Willowmere Motors, a fictional network of car dealerships and repair shops, as the example.

Study notes

The text of this lesson, to read at your own pace. Information as of November 2026.

No labels, and no data set

Willowmere has two million customer records, but nobody has ever sorted them into groups. Marketing wants to find natural segments, like families, fleet buyers, or bargain hunters, without deciding the groups in advance. And the parts warehouse is testing a robot arm that should learn to stack parts by trial and error.

Unsupervised learning

Unsupervised learning finds patterns in data that has no labels: nobody tells the model the right answer. Its most common task is clustering: grouping data points so that points in the same cluster are more similar to each other than to points in other clusters. Typical uses are market segmentation, to find customers who behave alike, outlier analysis, to spot fraud, and recommendations, like products that people buy together. Because there is no ground truth, someone must look at the clusters, and decide what they mean.

How clustering works

Clustering depends on a measure of similarity, often a value between zero and one, where one means identical. Distance can be measured in several ways: Euclidean distance, a straight line, Manhattan distance, along a grid, cosine similarity, the angle between two vectors, and Jaccard similarity, for sets. Data points that fit no cluster are outliers, and they're often the most interesting ones. Algorithms differ too: some split the data into a set number of clusters, others build a hierarchy, others group dense regions, and others assume a statistical distribution. And the work is iterative: you change the features or the number of clusters, and look again.

Reinforcement learning

Reinforcement learning works differently again: an agent learns by interacting with an environment, through trial and error, with no labeled data. At each step, the agent observes the state of the environment, chooses an action, and receives a reward or a penalty. Over many attempts, it learns a policy: a strategy that tells it which action to take in each state. Its goal is to maximize the total reward over time, not just the next one, so the optimal policy may accept a small loss now for a bigger gain later. Methods like Q-learning, and deep Q-learning with a neural network, predict how good each action is in each state.

Which type of learning?

To choose the type of learning, look at the data and the goal. Supervised learning needs labeled data, and predicts a value or a category, like a price or a loan decision. Unsupervised learning has no labels, and finds structure, like segments or outliers. Reinforcement learning has no fixed data set at all: it learns actions from rewards, like a robot, a game player, or a self-driving car.

Recap

Let's recap. Unsupervised learning finds patterns in unlabeled data, and clustering groups similar data points. Similarity and distance measures drive clustering, and outliers are points that fit no cluster. Reinforcement learning trains an agent in an environment, with rewards and penalties. The agent learns a policy, which maximizes the total reward over time. Supervised needs labels, unsupervised finds structure, and reinforcement learns actions.

Quick checks for this lesson

The 3 questions of this lesson, as plain text. The button above runs them with shuffled choices and the reason behind every choice.

  1. Willowmere’s marketing team wants to group customers by their buying behavior, and it has no list of groups in advance. Which approach fits?

    • Classification, from labeled customers
    • Regression on how much they spend
    • Reinforcement learning with rewards
    • Clustering, an unsupervised method
    Show the answer

    Clustering, an unsupervised method

    With no labels and no groups decided in advance, clustering finds groups of customers who behave alike. “Classification, from labeled customers” would need labeled examples, with the group of each customer already known. “Regression on how much they spend” would predict a number, like how much a customer will spend. And “Reinforcement learning with rewards” learns actions from rewards, which has nothing to do with grouping customers.

  2. Willowmere’s robot arm gets points when it stacks a part correctly, and loses points when it drops one. Over time, it learns which move to make in each position. What is this strategy called?

    • A label
    • A policy
    • A cluster
    • A loss function
    Show the answer

    A policy

    In reinforcement learning, the strategy that maps each state to an action is the policy. “A label” is the right answer in a labeled data set, and the robot has none. “A cluster” is a group of similar data points, from clustering. And “A loss function” is the penalty for bad predictions in supervised learning, not a strategy for acting.

  3. Willowmere has thousands of past loan applications, each one marked approved or declined, and wants a model that decides the new ones. Which type of learning fits?

    • Supervised learning
    • Unsupervised learning
    • Reinforcement learning
    • Fixed rules written by hand
    Show the answer

    Supervised learning

    Past applications come with their outcome, a label, so supervised learning fits, here as classification. “Unsupervised learning” would ignore the labels that Willowmere already has. “Reinforcement learning” would need an environment that gives rewards, not a set of past decisions. And “Fixed rules written by hand” would not learn anything from the data, and fails on every case that nobody planned.