activity: what is machine learning? - technocamps€¦ · current machine learning apps / games...

44
Activity: What is Machine Learning?

Upload: others

Post on 14-Jun-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Activity: What is Machine Learning?

Page 2: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Machine Learning

Machine Learning is a system with the ability to automaticallylearn and improve from experience without being explicitlyprogrammed.

Machine Learning focuses on the development of computerprograms that are provided with data and use it to learn bythemselves.

Page 3: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Activity: Do You Know Any ML systems?

Page 4: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

• Siri is a voice-activated assistant.• Siri listens to your instructions, and, when possible, carries them

out.• Siri can open apps, play your favourite music and can even tell

you a joke.

Current Machine Learning Systems Siri

Page 5: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Current Machine Learning Systems Security Cameras

• It is not possible for humans to keep monitoring hundreds/thousands of monitors at the same time, using technologies like:

• object recognition and facial recognition, this becomes possible.

Page 6: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Current Machine Learning Apps / Games

Draw It - mobile app.

Players competes with eachother in a online real timedrawing game.

The goal is to draw one of thetwo categories given, so thatthe computer can make anaccurate guess.

The computer is taughtthrough ML to recognisedrawings.

Click to play video.

Page 7: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Current Machine Learning Systems KUKA

KUKA is one of the world's leading suppliers of robotics.

Table tennis bot

Page 8: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

KUKAClick to play video.

Page 9: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Activity: How Does ML

Work?

Page 10: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Answer: Pattern Recognition

Pattern recognition is the ability to recognise patterns in data sets.

Computers can learn from patterns, for example a computer canlearn the difference between photos, such as the shapes and thecolour used.

Page 11: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Activity: Pattern Recognition (1)

What comes next?

Page 12: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Activity: Pattern Recognition (2)

What comes next?

Page 13: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Activity: Number Sequences

Can you spot the pattern in these sequences? Write the numberthat will come next:

1, 2, 3, 4, 5, …

2, 4, 6, 8, 10, …

8, 4, 0, -4, -8, …

1, 2, 4, 7, 11, 16, 22, …

1, 1, 2, 3, 5, 8, 13, 21, 34, …

Page 14: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Activity: Pattern Recognition (3)

The Eiffel Tower was the tallest structure in the world until 1930. Ifthe first three images above were taken on March 1888, July 1888,and November 1888, which of the following dates is the mostreasonable for the final picture of the completed tower?

a) January 1890

b) July 1889

c) March 1889

d) December 1888

Page 15: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Activity: Pattern Recognition (4)

What number fits into the question mark?

Page 16: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Activity: Pattern Recognition (5)Advanced

The top two scales in theimage at the right are inperfect balance. How manydiamonds will be needed tobalance the bottom set?

Page 17: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Activity: ML Simulation,

Turtle or Tortoise

Page 18: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

The Training Data

Page 19: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

With MLClick to play video.

Page 20: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Without MLClick to play video.

Page 21: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Machine Learning in

Scratch

https://machinelearningforkids.co.uk

Page 22: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Make Me Happy

Page 23: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Make Me Happy

Go to https://machinelearningforkids.co.uk/

Click on “Get started”.

Click on “Try it now”.

Click on “Projects” on the top menu bar.

Click the “+Add a new project” button.

Name your project “make me happy” and set it to learn how torecognise “text” and click the “Create” button.

Page 24: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Make Me Happy

Make a sprite with three costumes:1) ”not sure” face.2) ”happy” face.3) “sad” face.

Page 25: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Make Me Happy

Program your sprite so that:

1) When we start the game, display not sure face.2) Ask the question “Type a message: ”3) If the answer is “I think you are cool” then, display happy face.3) If the answer is “You smell bad” then, display sad face.

Page 26: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Make Me Happy

Page 27: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Make Me Happy

Page 28: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

What you have done so far?

You have created a sprite that is happy when you say that it is‘cool’ and sad when you say it ‘smells bad’.

However, what is the problem with our game?

How can we improve it?

Page 29: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Make Me Happy

Training the machine

Page 30: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Make Me Happy

Click the “Add example” button in the “kind things” label, andtype in the nicest, kindest compliment you can think of.

Click the “Add example” button in the “mean things” label, andtype in the meanest, cruelest insult you can think of (bereasonable and appropriate).

Write at least six compliments and at least six insults.

Page 31: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Make Me Happy

Page 32: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Make Me Happy

Click on the “< Back to project” link.

Then click on the “Learn & Test” button.

Click on the “Train new machine learning model” button. As longas you have entered an even amount of examples, thecomputer should start to learn how to recognise messages fromthe examples you have given it.

Page 33: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

What have you done so far?

You have started to train a computer to recognise text as beingkind or mean.

This is called “supervised learning” because of the way you aresupervising the computer’s training. The computer will learn frompatterns in the examples you have given it.

Page 34: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Make Me Happy

Program your sprite so that:

1) When we start the game, display not sure face.2) Ask the question “Type a message: ”3) If the answer is recognised as “kind” then, display happy face.4) If the answer is recognised as “mean” then, display sad face.

Page 35: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Make Me Happy

Page 36: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Make Me Happy

Page 37: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Tips

More examples! The more examples you give it, the better the computer should get at recognising whether a message is kind or mean.

Try and be even Try and come up with roughly the same number of examples for kind and mean. If you have a lot of examples for one type, and not the other, the computer might learn that type is more likely, so you’ll affect the way that it learns to recognise messages.

Mix things up with your examples Try to come up with lots of different types of examples. For example, make sure that you include some long examples and some very short ones.

Page 38: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

What have you done?

You have modified your Scratch character to use machinelearning instead of the earlier approach.

The more examples you give it, the better it should get atrecognising messages correctly.

Page 39: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Activity: Ideas and Extensions

Now that you’ve finished, why not give one of these ideas a try? Orcome up with one of your own?

Write a reply (easy)Instead of just changing the way they look, make your character reply, based on what it recognises in the message!

Try a different character (medium)Instead of a person’s face, why not try something different, like an animal? It could react in different ways, instead of smiling. For example, you could make a dog that wags their tail if you say something kind to it!

Different emotions (hard)Instead of kind and mean, could you train the character to recogniseother types of message?

Page 40: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Activity: ML Quiz Time!

Page 41: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Activity: Quiz Question 1

Which of these would probably be best for training a computer torecognise a photo of an apple?

a) Photos of dogs.b) Varied photos of different types of apples in different places.c) Identical photos of an apple.d) Very, very similar photos of the same apple in the same place.

Page 42: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Activity: Quiz Question 2

A machine learning system trained to recognise pictures with atree in should be good at which of the following tasks:

a) Identifying pictures of fruit.b) Recognising the emotion in a piece of writing.c) Recognising pictures of trees.

Page 43: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Activity: Quiz Question 3

Alice and Bob both want to train a machine learning system torecognise if text is happy/positive or sad/negative. Which of themwill probably train the best system?

a) Alice. She has collected 10 varied examples of happy text, and10 varied examples of sad text.b) Bob. He has collected 1000 examples of happy writing and 10examples of sad writing.

Page 44: Activity: What is Machine Learning? - Technocamps€¦ · Current Machine Learning Apps / Games DrawIt-mobileapp. Playerscompeteswitheach otherinaonlinerealtime drawinggame. Thegoalistodrawoneofthe

Activity: Quiz Question 4

Without machine learning, it would be impossible for searchengines such as Google to exist.

a) Trueb) False