Choose exam board for KS4 Computer Science (GCSE)
Choose exam board for KS4 English
Choose exam board for KS4 French
Choose exam board for KS4 Geography
Choose exam board for KS4 German
Choose exam board for KS4 History
Choose tier for KS4 Maths
Choose exam board for KS4 Music
Choose exam board for KS4 Physical education (GCSE)
Choose exam board for KS4 Religious education (GCSE)
Choose exam board for KS4 Spanish

Building a data-driven application

Lesson details

Learning outcome

I can build a simple application that uses predictions from a machine learning model to control program flow.

Key learning points

  1. Program events can be triggered when recognition points are met.
  2. Program flow can be changed using blocks that detect if a recognition point has been met, or by using certainty values.

Keywords

  • Recognition point - the level of certainty that causes an input to match a class

  • Program flow - the order in which the instructions in a program are executed

Common misconception

Building a machine learning app just means coding as you would do with any other programming project.

Building a machine learning app involves data collection, model training and coding the application. These facets are integral in developing a machine learning app.

Teacher tip

This lesson discusses certainty points. This could be linked back to the quick draw example where the model said "I know..." and it may be worth pupils revisting this.

Equipment

Pupils will need micro:bits for this lesson and access to a device that can access CreateAI online.

File needed for this lesson

microbit-Oak 1.29 MB (HEX)

Download this file to use in the lesson.

Licence

This content is © Oak National Academy Limited (2026), licensed on Open Government Licence version 3.0
except where otherwise stated. See Oak's terms & conditions
(Collection 2).

Lesson video

Loading...

Prior knowledge starter quiz

6 Questions

Q1.
What is the purpose of a null class in a machine learning model?

to classify all data as unknown
to improve the model's speed
to reduce the number of classes
Correct answer: to allow the model to recognise when data doesn't fit existing categories

Q2.
The process of removing or replacing outliers is called ...

Correct Answer: data cleaning, cleaning

Q3.
Which of the following is not a method for improving a machine learning model?

cleaning data
adding a null class
Correct answer: ignoring outliers
training on diverse data

Q4.
What does it mean for data to be misclassified?

The data is missing.
The data is noisy.
Correct answer: The model predicts the wrong class for the data.
The data is too complex.

Q5.
To reduce uncertainty in a model's predictions, you can add a class.

Correct Answer: null, ull

Q6.
Pair each problem with its solution.

Correct Answer:outliers,data cleaning

data cleaning

Correct Answer:misclassification,adding a null class

adding a null class

Correct Answer:bias,use diverse data

use diverse data

6 Questions

Q1.
Why is a smiley face a suitable icon for a "good" movement?

It uses fewer LEDs.
Correct answer: It represents something positive.
It's the default icon.

Q2.
What does the
1
is ML detected
block do?
Code colour

It shows an icon.
It plays a sound.
Correct answer: It checks if a prediction reaches a certain level of certainty.
It downloads the program.

Q3.
The level of certainty that causes an input to match a class is called the ...

Correct Answer: recognition point

Q4.
The default recognition point in CreateAI is ...

50%.
60%.
Correct answer: 80%.
100%.

Q5.
Match the block with its function.

Correct Answer:`show icon`,provides a visual output

provides a visual output

Correct Answer:`play sound`,provides an audio output

provides an audio output

Correct Answer:`is ML detected`,checks if a class is detected with a certain level of confidence

checks if a class is detected with a certain level of confidence

Correct Answer:`certainty (in %)`,gives a numerical value for the model's confidence

gives a numerical value for the model's confidence

Q6.
To use your machine learning model on the micro:bit, you need to your program to the device.

Correct Answer: download, save

To help you plan your 9 computing lesson on: Building a data-driven application, download all teaching resources for free and adapt to suit your pupils' needs...