☰ Year plan · Communication Technology

Search, sort and learning

Week 5 · Unit 1, Lesson 2 Artificial Intelligence Algorithms (2) · 3 lessons
3

Deep learning, and rules versus learning

ICT Prep 3 Term 1, Unit 1, Lesson 2: pp. 22–30
GoalSay what deep learning is and tell a fixed rule from a rule learned from data.
New words
deep learning · machine learning with a neural network that has many layersneural network · layers of connected units, loosely inspired by the brainfixed rule · a rule written by a person that does not change by itselflearned rule · a rule found by a model from data
Explanation

Deep learning is a kind of machine learning. It uses a neural network with many layers, loosely inspired by the brain; the word loosely matters, because it is a mathematical model and not a small brain. Deep learning is used for recognising faces and voices and for translation. Now compare two kinds of rules. In the program below, a person decided that 50 is the pass mark and wrote it into the code. This is a fixed rule: it never changes unless a person changes it. A learned rule would be found from data, for example from past results: the model would look at the study hours of earlier pupils and find where passing starts. A learned rule improves with more and better examples, but it needs training, and it can still be wrong.

Python
1score = 62
2if score >= 50:
3    print("Pass")
4else:
5    print("Fail")
Output
Pass
Worked examples
Fixed ruleLearned model
Who makes the rulea personthe model, from data
Does it changeonly if a person edits itcan improve with more examples
Needs trainingnoyes
Compare the two kinds in a table: a fixed algorithm is written fully by a person and does not change, while a learned model learns from data, improves with more and better examples, and needs training.
AB
1Study hoursResult
21fail
32fail
43fail
54pass
65pass
76pass
A teacher keeps the study hours and results of six earlier pupils. Failing happened up to 3 hours and passing from 4 hours. A learned rule would say that passing starts near 4 hours. With more pupils the border may move, so the model needs new examples.
Class activity

Write one fixed rule and one rule that a model could learn from data, both for sorting school bags into heavy and light. Say who chooses the border in each case.

Practice
1
What does the program in the lesson show for a score of 62?
2
Is the rule score >= 50 fixed or learned? Who chose 50?
3
Why do we say a neural network is only loosely inspired by the brain?
4
Name two uses of deep learning.