Machine Learning Fundamentals (IB CS A4.1): A Complete Guide

IB Computer Science A4.1 explained: what machine learning is, supervised vs unsupervised vs reinforcement learning, applications, and hardware. Examples and exam tips.

Machine learning is the part of the syllabus that powers the technology students actually use every day, from recommendations to voice assistants. Topic A4.1 sets up the whole of Theme A4: what machine learning is, the three ways it learns, and the hardware it runs on. Get the types straight here and the HL approaches in A4.3 make much more sense.

This guide covers both A4.1 understandings: the types of machine learning and their applications, and the hardware requirements for different ML scenarios.

What does IB CS topic A4.1 cover?

A4.1 has two understandings: describing the types of machine learning and their real-world applications, and describing the hardware requirements for the different scenarios in which machine learning is used. It is the foundation for the rest of Theme A4.

What is machine learning?

Machine learning (ML) is a branch of artificial intelligence in which a computer learns patterns from data rather than being explicitly programmed with rules. The model adjusts itself based on the data it sees and improves its output over time.

The contrast with traditional programming makes it clearer. In traditional programming, a human works out the rules and writes them as code: rules plus data go in, and output comes out. In machine learning, the data and the desired outputs go in, and the computer learns the rules itself, producing a model. That shift, letting the computer find the rules, is what makes ML so powerful for problems too complex to code by hand.

What are the types of machine learning?

There are three types, and they differ in what the data looks like and how the model learns.

Supervised learning uses labelled data, where each input comes with its correct output, and learns to map inputs to outputs so it can predict on new data. Unsupervised learning uses unlabelled data and finds structure or patterns on its own. Reinforcement learning has no fixed dataset: an agent acts in an environment and learns by trial and error to maximise a cumulative reward.

What is the difference between classification and regression?

Both are supervised tasks, and the difference is the kind of output.

Classification predicts a category, such as whether an email is spam or not spam, or which animal is in a photo. Regression predicts a continuous number, such as a house price or tomorrow's temperature. A quick test: if the answer is a label, it is classification; if the answer is a quantity, it is regression.

Worked example: which type of learning?

Classify each task:

  • Predicting house prices from past sales: supervised, and specifically regression (the output is a number).

  • Grouping customers by shopping habits with no labels: unsupervised (clustering, since there are no given answers).

  • Training a program to play a game by rewarding wins: reinforcement (an agent learning from reward).

What hardware does machine learning need?

Different stages of an ML project demand different hardware.

Development and testing on small data sets runs fine on a normal CPU and laptop. Data engineering, cleaning and transforming large data sets, needs plenty of RAM and fast storage. Training and deep learning is the heavy stage: it involves huge numbers of parallel matrix calculations, so it relies on GPUs or TPUs, often in the cloud. Deployment (running the trained model to make predictions, called inference) is much lighter and can run on a CPU or even an edge device, where low latency matters more than raw power.

What are some real-world applications of machine learning?

Machine learning is everywhere: spam filters and image recognition (classification), recommendation systems and customer segmentation (often unsupervised), price and demand forecasting (regression), self-driving cars and game-playing AI (reinforcement), and natural language tools like translation and chatbots. Linking each application to its learning type is exactly the kind of connection exam questions reward.

Common exam mistakes for IB CS A4.1

  • Confusing supervised and unsupervised learning. Supervised data is labelled; unsupervised data is not.

  • Thinking reinforcement learning uses a labelled dataset. It learns from a reward signal through trial and error.

  • Mixing up classification (categories) and regression (continuous values).

  • Describing ML as ordinary programming. In ML the computer learns the rules rather than being given them.

  • Claiming all ML needs a GPU. Training benefits from GPUs/TPUs, but inference can run on light hardware.

Quick recap of A4.1

  • Machine learning learns patterns from data instead of being explicitly programmed with rules.

  • The three types are supervised (labelled data), unsupervised (unlabelled data), and reinforcement (learning from reward).

  • Supervised tasks split into classification (categories) and regression (continuous values).

  • Training needs heavy parallel hardware (GPU/TPU); inference can run on a CPU or edge device.

  • Applications span recommendations, image and speech recognition, forecasting, and autonomous systems.

Frequently asked questions

What is machine learning?

Machine learning is a branch of artificial intelligence in which a computer learns patterns from data instead of being explicitly programmed with rules. It builds a model from examples and improves its predictions as it sees more data.

What is the difference between supervised and unsupervised learning?

Supervised learning trains on labelled data, where each input has a known correct output, and learns to predict that output for new inputs. Unsupervised learning uses unlabelled data and finds structure or patterns on its own, such as grouping similar items together.

What is reinforcement learning?

Reinforcement learning is a type of machine learning in which an agent learns to make decisions by acting in an environment and receiving rewards or penalties. Over time it learns the actions that maximise its cumulative reward, which suits game-playing and robotics.

What is the difference between classification and regression?

Classification and regression are both supervised tasks. Classification predicts a category, such as spam or not spam, while regression predicts a continuous numerical value, such as a price or temperature.

Why do GPUs help with machine learning?

Training a model, especially deep learning, requires huge numbers of matrix calculations that can be done in parallel. GPUs (and TPUs) have thousands of cores designed for exactly this parallel work, so they train models far faster than a CPU.

What hardware is needed to train versus run a model?

Training is computationally heavy and benefits from GPUs or TPUs, often in the cloud. Running the trained model to make predictions (inference) is much lighter and can run on an ordinary CPU or an edge device.

Looking for a printable summary? Grab the A4.1 Shuttle Learning revision sheet, a three-page knowledge organiser covering everything above.

Looking for an IB Computer Science tutor?

Hi, I'm Yuness, the tutor behind Shuttle Learning. I work one to one with IB Computer Science students at SL and HL, and I deliberately take on only a handful each year so every student gets my full attention. Most go on to earn the 6s and 7s they were aiming for, in the final exams and the IA alike.

If you would like that kind of support, book a free 15-minute call and tell me what you are stuck on. You can press BOOK A LESSON .

 

 

Logo

All trademarks, logos and brand names are the property of their respective owners. All company, product and service names used in this website are for identification purposes only. Use of these names, trademarks and brands does not imply endorsement.


Follow us on:

Icon
Icon
Icon
Icon
Icon

Support@shuttlelearning.com

Logo

All trademarks, logos and brand names are the property of their respective owners. All company, product and service names used in this website are for identification purposes only. Use of these names, trademarks and brands does not imply endorsement.


Follow us on:

Icon
Icon
Icon
Icon
Icon

Support@shuttlelearning.com

Logo

All trademarks, logos and brand names are the property of their respective owners. All company, product and service names used in this website are for identification purposes only. Use of these names, trademarks and brands does not imply endorsement.


Follow us on:

Icon
Icon
Icon
Icon
Icon

Support@shuttlelearning.com