The Hong Kong Polytechnic University · FACULTY OF INFORMATION TECHNOLOGY

MM1041 Chap.6 Three Types of Machine Learning

- one subject, every graph, every model, every mark
7 Chapters4-page Bible
Our own words - no uploaded lecturer files
Updated for this semester
Chapter 6 of 11 · MM1041

Three Types of Machine Learning

One distinction, three labels

Both the first lecture and the e-learning lesson divide machine learning into three types, using the same labels. Supervised learning is trained with targets, unsupervised learning is trained without targets, and reinforcement learning is trained with mistakes.

The whole chapter rests on one question you can ask of any system: what does its training signal contain?

Supervised learning

Supervised models learn from examples that people have labelled. The lesson's images carry labels such as cat, bird or car; the model learns features such as wheels, eyes and ears, and predicts the category of a new test image. That is classification, with a discrete label.

Regression uses a continuous label: the lesson trains on people described by gender, height and age, each labelled with weight, and predicts the weight of a new person. Object detection for autonomous driving is the showcase application.

Unsupervised learning

Unsupervised models learn from data with no labels.

They can group similar images, such as dogs with dogs and pandas with pandas, without being told what either animal is, and they can reduce dimension by storing a compact representation that keeps the key information.

The lesson's demonstration turns a video of a horse into a realistic video of a zebra with no labelled examples.

Reinforcement learning

A reinforcement learning agent senses the state of its environment, takes an action and receives a new state with a reward or a penalty. It adjusts its strategy to maximise reward.

The examples are computer games and a robot that learns to navigate a changing room without hitting obstacles.

Training data, testing data and overfitting

The first lecture adds the data side. Data is called the new oil: expensive, only valuable once converted into something useful for decisions, produced in greater quantity as operations grow, and less valuable the more people hold it.

Training data trains an algorithm; testing data tests it. An algorithm that fits its training data but not the real situation is overfitting, which the lecturer compares with doing every past paper without understanding the subject.

In this chapter

What this chapter covers

  • 01

    Trained with targets, without targets, with mistakes

  • 02

    Classification with categorical labels

  • 03

    Regression with continuous labels

  • 04

    Clustering and dimension reduction

  • 05

    Agent, environment, reward and penalty

  • 06

    Training data against testing data

  • 07

    Overfitting and the past-papers analogy

Worked example · free

Choose a learning type for three bank problems

Q [6 marks]. AskSia-authored practice. A bank has three projects: predicting the size of next month's withdrawals at each ATM; spotting groups of customers with similar spending habits; and teaching a chatbot, through feedback on its replies, to resolve queries in fewer turns. Name the type of machine learning and the task for each. The marks shown are an AskSia study allocation and are not the University's marking scheme.
Three branches.Three branches. The label in the middle of each box, targets, no targets or mistakes, is the whole difference.The training signal decides the typeMachine learningSupervisedtrained with targetsclassification, regressionUnsupervisedtrained without targetsclustering, dimension reductionReinforcementtrained with mistakesgames, robot navigation
Three branches. The label in the middle of each box, targets, no targets or mistakes, is the whole difference.
  • 2Classify the ATM project.
  • 2Classify the spending-groups project.
  • 2Classify the chatbot project.
The ATM project is supervised learning for regression. Each past month is labelled with the amount actually withdrawn, a continuous number, so the model learns to predict that number. The spending-groups project is unsupervised learning for clustering, because no group labels exist and the model must find similar customers by itself. The chatbot project is reinforcement learning, because the chatbot acts, receives feedback that works as a reward when a query is resolved quickly and a penalty when it is not, and adjusts its replies to earn more reward.
Sia tip — Underline the target in the question. A number means regression, a category means classification, no target means unsupervised, and feedback on actions means reinforcement.
Glossary

Key terms

Classification
A supervised task that predicts a discrete category, such as spam or not spam.
Regression
A supervised task that predicts a continuous number, such as a weight or a sales figure.
Clustering
An unsupervised task that groups similar data points without predefined labels.
Dimension Reduction
Representing data with fewer features while keeping the information that matters.
Training Data
Data used to train an algorithm.
Testing Data
Separate data used to check how well a trained algorithm performs on examples it has not seen.
Reward Signal
Feedback that tells a reinforcement learning agent how good its last action was.
FAQ

Three Types of Machine Learning FAQ

What is the easiest way to tell supervised from unsupervised learning?

Check whether the training examples carry the answer. If each example comes with a label that people supplied, such as a category or a number, the learning is supervised. If the data arrives with no labels and the model has to find structure by itself, it is unsupervised. The course summarises this as trained with targets against trained without targets.

Why is reinforcement learning described as trained with mistakes?

Because there is no labelled right answer for each step. The agent tries actions, and the environment returns a reward when things go well and a penalty, which the lesson calls a mistake, when they do not. Over many attempts the agent shifts toward actions that earn reward, as a game program or a navigating robot does.

How can a model that scores well still be a bad model?

If it was scored on its own training data. A model can fit the examples it learned from almost perfectly and still fail on new cases, which is overfitting. The protection is to keep separate testing data and judge the model only on examples it did not see, just as practising the same past papers does not prove you understand the subject.

Which type of learning does a chatbot like ChatGPT use?

The first lecture sets this as an in-class pairing question for discussion. A defensible reply is that a large chatbot combines types: it learns patterns from vast amounts of unlabelled text, is refined with examples of good replies, and is further tuned with human feedback that acts like a reward. Say which part of the system you mean.

Study strategy

Exam move

Build a two-column flash card set: a business problem on the front, the learning type and task on the back. Aim for twelve cards spread across the three types, including at least two regression cases. Then rehearse the overfitting explanation in one sentence with the past-papers analogy.

Working through Three Types of Machine Learning in MM1041? Sia is AskSia’s AI Information Technology tutor — ask any MM1041 Three Types of Machine Learning question and get a clear, step-by-step explanation grounded in how MM1041 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.

A+Everything unlocked
Unlocks this Bible + all 8 of your The Hong Kong Polytechnic University subjects - and 1,000+ Bibles across every Australian university.
Sia - your MM1041 tutor, unlimited, worked the way the exam marks it
The full 4-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$0.99 Trial
30-day money-back · cancel in one tap · how it works