Teacher Presentation - CCGS Computer Science

Download Report

Transcript Teacher Presentation - CCGS Computer Science

Computer Science Inside…
Predictive Text Messaging
and
Machine Learning
Quintin Cutts, Margaret Brown
University of Glasgow
C
S Inside...
Predictive Texting
How many of you own mobile phones?
• What do you use your mobile phone for?
• How many text messages do you send in a
day?
• How long does it take you to send a text?
• Is there anything difficult about sending texts?
C
S Inside...
Predictive Texting
Who has used Predictive Texting?
• Does it speed up your texting?
.
• Hello
– Non-predictive
4433555 <pause> 555666
– Predictive
43556
• Is it good/ bad then?
C
S Inside...
Predictive Texting
1
ABC
2
DEF
3
GHI
4
JKL
5
MNO
6
PQRS
7
TUV
8
WXY
Z
9
_
0
Predictive Text Messaging…
• Does it always offer you the word you want?
• What do you notice when you get a new phone?
• You have to tell it words e.g. names
• You teach it!
• Does it get better?
• It should learn the words that you use most often
• and so offer you better words over time
C
S Inside...
Predictive Texting
How does it work??
• Any ideas how the system (phone/computer/etc)
might learn from the user?
• We are going to look at how it might do that:
– You are going to pretend to be users and predictive
text systems and experience how they work!
User
typing in
the txt
C
S Inside...
Predictive test system
interpreting key presses,
offering words
Predictive Texting
Setting up the System
• Get into pairs
• Each get a mobile phone texting dictionary
– Contains mappings:
• from keypad codes
• to possible words with that coding
– and a frequency column:
• so we can record how often that word's been requested, by
keeping a tally
CS
Inside...
Code
Word
22537
abler
baker
bakes
baler
Predictive Texting
bales
cakes
Frequency
An example first
• In this run, I'll be the user, and you'll all
be the predictive text system
– have your dictionaries at the ready
• I'll read out codes to you, and explain
how to operate the dictionary…
C
S Inside...
Predictive Texting
Setting up the messages
• You will each be given two text messages to send
– don't show them to your partner
• Task 1: encode the words of the 2 messages into
button presses
– DO NOT DO ANYTHING TO THE CODED MESSAGE
– you have the keypad to help you
C
–
–
–
–
'a' or 'b' or 'c' => 2
'd' or 'e' or 'f' => 3
…
Hence “bad” => 223
S Inside...
Predictive Texting
Acting as phone user and
predictive text system
• In your pair
– one'll be user and the other the pred. text system
– and then you'll swap round
• As a user
– you have some messages to send
• As the predictive text system
– you have your own dictionary, which will record all words
seen, and how often they're used
• Decide who will be user, who pred. text system first…
C
S Inside...
Predictive Texting
Each user send the txts using their new mobile
• User
– send 1st word of 1st message to the text system
– do this by saying the numbers aloud to the text system
• Text system
–
–
–
–
use table to decide which word to offer the user
pick the word with the highest frequency (if all the same, pick top one)
tell the user the word
if no entry present for that code, add a new entry
• User
– if the word offered is correct, tell the system so, and move on to the next
word/code
– if word not correct, tell the system so
• Text system
– If word offered is correct, add a bar (5-bar gates) to frequency for that
word
– If the word offered is incorrect, continue offering words until it’s correct.
Remember to update table when correct word found.
– If all offered words are incorrect, add a new entry
• Continue until
CS
– all words in the txt are translated
Predictive Texting
Inside...
Activity 1 – run the system…
• Try two sentences each and see how you go
– i.e swap roles between user and text system
• User try and work out if the system is getting better at
knowing which word to offer you
• Think about why this might be?
C
S Inside...
Predictive Texting
Activity 2 – What has been learned?
• The final text is coded already
– and is the same for both of you
• Read the codes to your partner
– Write down the first response
• i.e. text systems – go for the most popular, or the first of
a group of some of equal popularity
• What sentence do you each get?
C
S Inside...
Predictive Texting
What did you discover?
• How frustrating/annoying/ time consuming was this
task for the user?
• What was hard about being the predictive text
system?
• Did the system get better at making predictions?
– Why? Why not?
– What was the important step in getting better or not?
C
S Inside...
Predictive Texting
Learning…?
• How is the system trying to learn?
– It learned which words the user used most by counting the
frequency. It can then offer the user the most popular words
first
– The system adapts to the user - it learns!!
• Why is it not very good?!
• Why do some phones not include a learning capacity?
• Why do we need machines to learn?
– So they can adapt to their environment
– New knowledge does not mean complete redesign
– So it can learn from human activity
C
S Inside...
Predictive Texting
Conclusion
• This is a large area of Computing Science
– Artificial Intelligence deals with intelligent behaviour,
learning and adaptive behaviour in machines
– It is a very challenging and important area of the discipline
• What other applications of AI and machine learning
are there?
– Can you guess what the artificial intelligence in the following
applications might be:
C
S Inside...
»
»
»
»
»
»
»
Speech Recognition
Game playing
Computer Vision
Expert Systems
Robots
Genetic Programming
Any others you can think of…?
Predictive Texting