New
New
Year 9

Building a data-driven application

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

New
New
Year 9

Building a data-driven application

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

These resources will be removed by end of Summer Term 2025.

Switch to our new teaching resources now - designed by teachers and leading subject experts, and tested in classrooms.

These resources were created for remote use during the pandemic and are not designed for classroom teaching.

Lesson details

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 a computer program executes instructions

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.


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

File needed for this lesson

  • microbit-Oak 1.29 MB (HEX)

Download this file to use in the lesson.

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.
Teacher tip

Equipment

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

Licence

This content is © Oak National Academy Limited (2025), 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

Download quiz pdf

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

Assessment exit quiz

Download quiz pdf

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

When programmers write code, they use a special tool called an IDE (Integrated Development Environment). In an IDE, different colours are used to help programmers understand the code:


  • • Blue - numbers and boolean values
  • • Green - strings
  • • Purple - keywords
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
show icon
- 

provides a visual output

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

provides an audio output

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

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
certainty (in %)
- 

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