Home of real teaching & learning
  • Full support for teachers
  • Focus on critical thinking
  • Engaging classroom activities
  • Integrated student eBook
  • Assessed tasks / qBank
  • Practice exam questions

The InThinking Guarantee: Our sites are written by expert practitioners and not by AI

See our AI policy

Disclaimer: InThinking subject sites are neither endorsed by nor connected with the International Baccalaureate Organisation.

Don't miss out, find out!

A 4.2.1 / A 4.2.2 Data cleaning and feature selection

A4.2.1/A4.2.2 Data cleaning and feature selection

A4.2.1 emphasises data cleaning, as data quality directly impacts model performance. Techniques include handling outliers, removing duplicates, correcting/filtering data, transforming formats, and managing missing values via imputation/deletion/predictive modelling. A4.2.2 focuses on feature selection to identify and retain the most informative data attributes, using strategies like filter, wrapper, and embedded methods

Learning Objectives

By the end of this lesson, students will be able to:

  • Describe the significance of data cleaning and explain the impact of poor data quality on model performance.
  • Identify and describe various data cleaning techniques for handling issues like missing data, duplicates, outliers, and incorrect formatting.
  • Describe the purpose of normalisation and standardisation as preprocessing steps.
  • Describe the role of feature selection in improving model efficiency and preventing overfitting.
  • Describe the three main strategies for feature selection: filter, wrapper, and embedded methods.

Approaches to Learning (ATL) Elements

  • Thinking Skills (Critical Thinking): Analysing "dirty" datasets to identify specific problems; evaluating the trade-offs between different data cleaning techniques (e.g., deletion vs. imputation).
  • Problem-Solving Skills: Applying a systematic process to identify issues in a dataset and propose a logical sequence of steps to clean it.

Lesson Resources

Presentations

Link to presentation

eBook

To make the eBook page available for students use the page manager in the student access section to make it visible. 

A4.2.1 Describe the significance of data cleaning. 

A4.2.2 Feature selection 

Other Resources

To make the Worksheets available for students use the page manager in the student access section to make it visible. 

A 4.2.1 / A 4.2.2 Worksheet 

A 4.2.1 / A 4.2.2 Worksheet Answers 

A 4.2.1 /A 4.2.2 Quizlet

A4.2_Clean_the_Sheet_Teacher_Key.xlsx

A4.2_Clean_the_Sheet_Student.csv

A4.2_Clean_the_Sheet_Student.xlsx

Detailed Lesson Plan

Timing (Mins)Description of ActivitySlide #
0-5Introduction and Hook: Start with the “Gourmet Chef” analogy. Ask students: “Can a world-class chef make a delicious meal with rotten, low-quality ingredients?” Introduce the principle of “Garbage In, Garbage Out” (GIGO) in machine learning. ATL Focus: Thinking Skills (Metacognition).1-2
5-20Lecture: The Importance of Data Cleaning (A4.2.1): Explain why data quality matters (model accuracy, fairness and reliability). Cover techniques for common data problems: missing data (deletion vs imputation with mean or median); errors (outliers, typos, invalid formats); duplicates and irrelevant data. Briefly introduce normalisation vs standardisation.3-6
20-35Practical Activity: “Clean the Sheet”, Part 1: Give students the Clean the Sheet spreadsheet (gym membership data). In pairs, students act as “Data Janitors”: find at least 8 problems, and for each one record the row, the type of problem and the action they would take, with a reason where more than one action is sensible. Take feedback on the first seven rows using slide 8, then draw out the extra cases from the teacher key: the near-duplicate, the missing target, and the genuine outlier that should be kept. ATL Focus: Problem-Solving and Communication Skills.7-8
35-45Lecture: Feature Selection, Why Less is More (A4.2.2): Explain the role of feature selection: to reduce noise, prevent overfitting and decrease training time. Describe the three strategies at a conceptual level: filter methods (selecting features before the model), wrapper methods (using the model to select features), embedded methods (the model selects features during training).9-12
45-55Practical Activity: “Clean the Sheet”, Part 2: Using the same spreadsheet, pairs decide for each column whether to keep it or drop it as an input to the model, with a one-line reason. Renewed is the target, not an input. Draw out the identifiers, the constant Currency column, the redundant Age and BirthYear pair, and the irrelevant FavouriteColour. Then ask which of the three strategies would drop each one.9-12
55-60Consolidation and Exit Check: Each student writes one cleaning problem from the sheet with the action they would take, and one column they dropped with the strategy that would remove it. Reiterate that data preprocessing comes before any model is trained. Preview the next lesson: dimensionality reduction and the “curse of dimensionality”.13

Teacher Notes: Challenges & Solutions

  • Challenge: The concepts, especially the different techniques for handling missing data or the feature selection strategies, can seem abstract and dry. The extended dataset carries both halves of the lesson, so feature selection is practised on data students have already cleaned rather than taught by analogy alone.
    • Solution: The practical, hands-on "Clean the Sheet" activity is critical. It makes the problems tangible and forces students to think like data scientists. For feature selection, rely heavily on the analogies provided on the slides to make the concepts intuitive.
  • Challenge: Students might get bogged down in the mathematical details of statistical tests (for filter methods) or normalisation formulas.
    • Solution: The syllabus requires students to describe these concepts, not implement them mathematically. Reassure them that the goal is to understand what the technique does and why it's used, not the complex underlying formulas. Keep the focus conceptual.
  • Challenge: Distinguishing between Filter, Wrapper, and Embedded methods.
    • Solution: Use the analogies as a constant reference point. Reinforce the key timing difference: Filter (before), Wrapper (during, via trial-and-error), Embedded (during, automatically). A quick table on the board summarising the "When" and "How" for each can be a useful visual aid.
All materials on this website are for the exclusive use of teachers and students at subscribing schools for the period of their subscription. Any unauthorised copying or posting of materials on other websites is an infringement of our copyright and could result in your account being blocked and legal action being taken against you.

Help