Grades 3β5
How a Computer Makes a Prediction
For three days, we open up an AI and see what's inside. Spoiler: it's mostly multiplication.
Day 1
Inputs, weights and outputs
Computers make predictions
A prediction is a guess about something we don't know yet, made from something we do know.
Weather
The weather app says it will rain.
Videos
A video site picks your next video.
Words
A phone guesses your next word.
Where has a computer made a prediction for you?
Elementary School Β· Grades 3β5
Let's make a prediction
A zoo gets more visitors when it's sunny.
How did you know? You multiplied 3 Γ 200.
That is exactly what a neural network does!
Elementary School Β· Grades 3β5
Inside a neural network
Input value
The number that goes in: 3 hours of sun.
Weight
The number on the connection. The input is multiplied by it.
Output value
The number that comes out: the prediction.
Elementary School Β· Grades 3β5
Words to know
- AI
- Computer programs that do things that usually take human thinking.
- Prediction
- A guess about something we don't know yet.
- Neural network
- A kind of AI that passes numbers along connections and multiplies them.
- Input value
- The number that goes into the network.
- Weight
- The number on a connection. The input is multiplied by it.
- Output value
- The number that comes out: the network's prediction.
Elementary School Β· Grades 3β5
Activity
Predict the cricket chirps
Crickets chirp faster when it's warm: 6 more chirps for every degree. So the weight is 6.
- Work out the output on paper.
- Type in your prediction.
- Step on to check.
Say your multiplication out loud to your partner!
Elementary School Β· Grades 3β5
Spot the pattern
| degrees | 15 | 20 | 25 | 30 |
|---|---|---|---|---|
| chirps | 90 | 120 | 150 | 180 |
What do you add each time? Why does that work?
Each input is 5 degrees warmer, and 5 Γ 6 = 30.
Elementary School Β· Grades 3β5
Let's talk
- What are the three parts of the network we used today?
- What would the cricket network say at 10 degrees?
- What would change if crickets chirped 7 times a minute for each degree?
Elementary School Β· Grades 3β5
Day 2
Fixing a network that's wrong
Today the weights are wrong!
Output value
The network's guess.
Target output
The real answer: what actually happened.
A match
When the guess and the real answer match, the lines turn green.
Your job: fix the weights!
Elementary School Β· Grades 3β5
Words to know
- Target output
- The real answer. The output should match it.
- Tuning
- Changing a weight, a little at a time, until the outputs match the targets.
Elementary School Β· Grades 3β5
Activity
Fix the phone battery
The weight is wrong! A 1-hour video really uses 12% of the battery.
- Click the weight. Change it.
- Step through all four videos.
- Green lines mean it matches!
Too big or too small? Should the weight go up or down?
Elementary School Β· Grades 3β5
Activity
Two outputs, two weights
One input, the temperature, now makes two predictions: smoothies and popsicles.
Each output has its own weight. Find both!
Elementary School Β· Grades 3β5
Share the shortcut
Did you find a faster way than guessing? Some people divide the target by the input.
Would that still work with two inputs?
Elementary School Β· Grades 3β5
Let's talk
- How did you know which way to change the weight?
- Why test all four inputs, not just one?
- What did you do each time you got it wrong?
Elementary School Β· Grades 3β5
Day 3
Two inputs at once
Two inputs at once
What decides how many butterflies visit a garden? Often more than one thing.
Multiply each input by its weight, then add.
Elementary School Β· Grades 3β5
Words to know
- Input values
- The numbers that go in. A network can have more than one.
- Connection
- The line that carries a number from an input to an output.
- Total
- Each input times its weight, added together.
Elementary School Β· Grades 3β5
Activity 1
One weight to change
Make each bush count twice as much as each flower bed.
- The flower bed weight is already 1.
- What should the bush weight be? Change it.
- Check it works for all four gardens.
Elementary School Β· Grades 3β5
Activity 2
Both weights to find
Find the weight for each hour of sun and each liter of water. Both are between 0 and 1.
0.5 is a half
Like half a pizza.
0.25 is a quarter
Like a quarter of a pizza.
One at a time
Change one weight, then check.
Elementary School Β· Grades 3β5
Done early?
What does each weight mean?
The Honey Harvest Predictor has two weights: 0.28 and 0.45.
Elementary School Β· Grades 3β5
Let's talk
- In the tomato garden, which matters more: an hour of sun or a liter of water?
- What does a bigger weight tell us about an input?
- Why was this harder than one input?
Elementary School Β· Grades 3β5
Design your own network
Pick something to predict from your own life, like minutes of reading and pages read.
- Choose the input it depends on.
- Choose a weight.
- Work out the output for two different inputs.
- Share it with the class!
Elementary School Β· Grades 3β5
How does a computer make a prediction?
It multiplies each input by a weight and adds them up.
It gets better by checking its answers and adjusting its weights.
Keep exploring at iinnoo.app
Elementary School Β· Grades 3β5