A4 Machine learning

For the new IB Diploma Computer Science syllabus to start teaching in August 2025, and for first examinations in May 2027.

Unit and lesson overviews will be gradually published as developed.

Lesson 1: Intro to ML

A4.1.1 Describe the types of machine learning and their applications in the real world.

  • The different approaches to machine learning algorithms and their unique characteristics
  • Deep learning (DL), reinforcement learning (RL), supervised learning, transfer learning (TL), unsupervised learning (UL)
  • Real-world applications of machine learning may include market basket analysis, medical imaging diagnostics, natural language processing, object detection and classification, robotics navigation, sentiment analysis.

Lesson 2: ML hardware

A4.1.2 Describe the hardware requirements for various scenarios where machine learning is deployed.

  • The hardware configurations for different machine learning scenarios, considering factors such as processing, storage and scalability
  • Hardware configurations for machine learning ranging from standard laptops to advanced infrastructure
  • Advanced infrastructure must include application-specific integrated circuits (ASICs), edge devices, field-programmable gate arrays (FPGAs), GPUs, tensor processing units (TPUs), cloud-based platforms, high-performance computing (HPC) centres.

Lesson 3: Pre-processing (HL)

A4.2.1 Describe the significance of data cleaning.

  • The impact of data quality on model performance
  • Techniques for handling outliers, removing or consolidating duplicate data, identifying incorrect data, filtering irrelevant data, transforming improperly formatted data, and imputation, deletion or predictive modelling for missing data
  • Normalization and standardization as crucial preprocessing steps

A4.2.2 Describe the role of feature selection.

  • Feature selection to identify and retain the most informative attributes of the data set
  • Feature selection strategies: filter methods, wrapper methods, embedded methods

A4.2.3 Describe the importance of dimensionality reduction.

  • The curse of dimensionality considerations may include overfitting, computational complexity, data sparsity, the effectiveness of distance metrics, data visualization, sample size increases, memory usage.
  • Dimensionality reduction of variables, while preserving the relevant aspects of the data. Note: Statistical techniques such as principal component analysis (PCA) and linear discriminant analysis (LDA) are beyond the scope of this course.

Lesson 4: Linear regression (HL)

A4.3.1 Explain how linear regression is used to predict continuous outcomes.

  • The relationship between the independent (predictor) and dependent (response) variables
  • The significance of the slope and intercept in the regression equation
  • How well the model fits the data—often assessed using measures like r2.

Lesson 5: Classification (HL)

A4.3.2 Explain how classifications techniques in supervised learning are used to predict discrete categorical outcomes.

  • K-Nearest Neighbours (K-NN) and decision trees algorithms to categorize new data points, based on patterns learned from existing labelled data
  • Real-world applications of K-NN may include collaborative filtering recommendation systems.
  • Real-world applications of decision trees may include medical diagnosis based on a patient’s symptoms.

Lesson 6: Hyper parameters (HL)

A4.3.3 Explain the role of hyperparameter tuning when evaluating supervised learning algorithms.

  • Accuracy, precision, recall and F1 score as evaluation metrics
  • The role of hyperparameter tuning on model performance
  • Overfitting and underfitting when training algorithms

Lesson 7: Clustering (HL)

A4.3.4 Describe how clustering techniques in unsupervised learning are used to group data based on similarities in features.

  • Clustering techniques in unsupervised learning group data based on feature similarities
  • Real-world applications of clustering may include using purchasing data to segment a customer base.

Lesson 8: Association rule (HL)

A4.3.5 Describe how learning techniques using the association rule are used to uncover relations between different attributes in large data sets.

  • Mining techniques using the association rule and interpretation of the results for a given scenario For example, in crime analysis, the techniques may reveal that areas with high rates of vandalism also often experience incidents of theft, assisting law enforcement in predictive policing and resource allocation.

Lesson 9: Reinforcement learning (HL)

A4.3.6 Describe how an agent learns to make decisions by interacting with its environment in reinforcement learning.

  • The principle of cumulative reward and the foundational concepts of agent–environment interaction, encompassing actions, states, rewards and policies
  • The exploration versus exploitation trade-off as a core concept in reinforcement learning

Lesson 10: Genetic algorithms (HL)

A4.3.7 Describe the application of genetic algorithms in various real-world situations.

  • For example: population, fitness function, selection, crossover, mutation, evaluation, termination
  • A real-world application of genetic algorithms is seen in optimization problems, such as route planning (e.g. the “travelling salesperson problem”).

Lesson 11,12: Artificial neural networks (HL)

A4.3.8 Outline the structure and function of ANNs and how multi-layer networks are used to model complex patterns in data sets.

  • An artificial neural network (ANN) to simulate interconnected nodes or “neurons” to process and learn from input data, enabling tasks such as classification, regression and pattern recognition
  • Sketch of a single perceptron, highlighting its input, weights, bias, activation function and output
  • Sketch of a multi-layer perceptron (MLP) encompassing the input layer, one or more hidden layers and the output layer.

Lesson 13: Convolutional neural networks (HL)

A4.3.9 Describe how CNNs are designed to adaptively learn spatial hierarchies of features in images.

  • Convolutional neural network (CNN) basic architecture: input layer, convolutional layers, activation functions, pooling layers, fully connected layers, output layer
  • The effect of the number of layers, kernel size and stride, activation function selection, and the loss function on how CNNs process input data and classify images

Lesson 14,15: Ethics

A4.4.1 Discuss the ethical implications of machine learning in real-world scenarios.

  • Ethical issues may include accountability, algorithmic fairness, bias, consent, environmental impact, privacy, security, societal impact, transparency.
  • The challenges posed by biases in training data
  • The ethics of using machine learning in online communication may include concerns about misinformation, bias, online harassment, anonymity, privacy.

A4.4.2 Discuss ethical aspects of the increasing integration of computer technologies into daily life.

  • The importance of continually reassessing ethical guidelines as technology advances
  • The potential implications of emerging technologies such as quantum computing, augmented reality, virtual reality and the pervasive use of AI on society, individual rights, privacy and equity

Lesson 16: Exam style questions

A4.3.10 Explain the importance of model selection and comparison in machine learning.

  • How different algorithms can yield different results depending on the data and type of problem
  • The reasons for selecting specific machine learning models over others, considering factors like the nature of the problem, its complexity and desired outcomes
  • The variability in algorithm performance based on the data’s characteristics

Lesson 17: Assessment


Copyright © Paul Baumgarten.