Machines! The Sorting Hat is sick today We need to help it sort - - PowerPoint PPT Presentation

machines the sorting hat is sick today
SMART_READER_LITE
LIVE PREVIEW

Machines! The Sorting Hat is sick today We need to help it sort - - PowerPoint PPT Presentation

Support Vector Machines! The Sorting Hat is sick today We need to help it sort the students! But all we know is: House Intelligence Bravery (Gryffindor or Ravenclaw) 5.5 10.5 ? 8 16 ? 12.5 4.5 ? 4 12 ? 10.5 6 ? 15 7 ?


slide-1
SLIDE 1

Support Vector Machines!

slide-2
SLIDE 2

The Sorting Hat is sick today

We need to help it sort the students!

slide-3
SLIDE 3

Intelligence Bravery House (Gryffindor or Ravenclaw) 5.5 10.5 ? 8 16 ? 12.5 4.5 ? 4 12 ? 10.5 6 ? 15 7 ? 10.5 13 ? 10 3 ?

But all we know is:

slide-4
SLIDE 4

Let’s look at what the Sorting Hat did before...

slide-5
SLIDE 5

Instructions for how to plot data

You have a list of people, each with an intelligence and bravery value, and house. For each person, write their intelligence and bravery value on a sticky note (use a pink sticky if they’re from Gryffindor and a blue sticky if they’re from Ravenclaw) Plot each sticky note on your paper

slide-6
SLIDE 6

Previous students

slide-7
SLIDE 7

Add new students to your plot (yellow stickies)

Intelligence Bravery House (Gryffindor or Ravenclaw) 5.5 10.5 ? 8 16 ? 12.5 4.5 ? 4 12 ? 10.5 6 ? 15 7 ? 10.5 13 ? 10 3 ?

slide-8
SLIDE 8

New students this year

slide-9
SLIDE 9

Here are their houses

Now, use a yardstick to “auto- sort” new students! Students on one side will be sorted into Gryffindor. Students on the other side will be sorted into Ravenclaw. Replace the yellow stickies with the correct color sticky.

slide-10
SLIDE 10

Don’t move your yardstick!

slide-11
SLIDE 11

What does your yardstick tell you about these students?

Intelligence: 16 Bravery: 15 Intelligence: 1 Bravery: 5.5

slide-12
SLIDE 12

What does your yardstick tell you about these students?

slide-13
SLIDE 13

What does your yardstick tell you about these students?

slide-14
SLIDE 14

What does your yardstick tell you about these students?

slide-15
SLIDE 15

This year’s new students!

Neville Longbottom Hermione Granger Parvati Patil Harry Potter Ron Weasley Dean Thomas Padma Patil Luna Lovegood Terry Boot Michael Corner

slide-16
SLIDE 16

So what makes a good line?

slide-17
SLIDE 17

So what makes a good line?

Bad!

slide-18
SLIDE 18

So what makes a good line?

Bad!

slide-19
SLIDE 19

So what makes a good line?

Good? Why?

slide-20
SLIDE 20

Maximum-margins!

slide-21
SLIDE 21

Next year!

slide-22
SLIDE 22

Welcome to another year at Hogwarts!

After being sick last year, the sorting hat is starting to think that it might be time to retire... We are the new Sorting Hat “in-training”! We choose the house, then the Sorting hat will tell us if we got it right

slide-23
SLIDE 23

Set up your yardstick, then don’t move it...

slide-24
SLIDE 24

Time to sort some students!

(yellow stickies)

Intelligence Bravery House (Gryffindor or Ravenclaw) 6 8 ? 8 4 ? 3 11 ? 12 14 ? 7 4 ? 6 2 ? 12.5 9 ? 11 9 ? 9 1 ? 12 1 ?

slide-25
SLIDE 25

Which houses do you think these students should be sorted into?

slide-26
SLIDE 26

Here are the answers. How did you do?

slide-27
SLIDE 27

So what makes a good line? (What should we do for next year?)

slide-28
SLIDE 28

Last year of Sorting-Hat-apprenticeship

slide-29
SLIDE 29

Set up your yardstick, then don’t move it...

slide-30
SLIDE 30

Intelligence Bravery House (Gryffindor or Ravenclaw) 6 5 ? 4 2.5 ? 10 10 ? 15 12 ? 14 9 ? 16 3 ? 14 12 ? 2 9 ? 5 1 ? 5 13 ?

Time to sort some students!

(yellow stickies)

slide-31
SLIDE 31

Which houses do you think these students should be sorted into?

slide-32
SLIDE 32

Here are the answers! How did you do?

slide-33
SLIDE 33

So what makes a good line? (Which line was better?)

slide-34
SLIDE 34

What if we had one more attribute (feature) of people that we were measuring?

(How would we incorporate this data into our “auto-sorter”?)

Intelligence Bravery Quidditch ability House 4 12 12 Gryffindor (Ron Weasley) 16 15 4 Gryffindor (Hermione Granger) 8 16 18 Gryffindor (Harry Potter)

slide-35
SLIDE 35

What if we had two more attributes (features)

  • f people that we were measuring?

(How would we incorporate this data into our “auto-sorter”?)

Intelligence Bravery Quidditch ability Kindness House 4 12 12 10 Gryffindor (Ron Weasley) 16 15 4 16 Gryffindor (Hermione Granger) 8 16 18 10 Gryffindor (Harry Potter)

slide-36
SLIDE 36

Now that we have the power to learn patterns from data and apply that knowledge...

slide-37
SLIDE 37

Let’s sort beings into human versus non-human!

You have a list of beings, their height, and whether they are human or non- human Put a piece of masking tape on your string for each being, and mark whether it is human or non-human Can you get 100% classification accuracy using your yardstick?

slide-38
SLIDE 38

We can do this from 2D to 3D too! (...or 3D to 4D! ...or 4D to 9D! …)

slide-39
SLIDE 39

Machine learning!

Model patterns in data (using math!) Use models to infer information from new data

slide-40
SLIDE 40

Support Vector Machines! (The math!)

Support Vector Machine

BIG margin

Small errors

= + =

Balance between reducing errors versus making a bigger margin

slide-41
SLIDE 41

Support Vector Machines! (The math!)

Big C: Errors are REALLY BAD! Small C: Errors are ok, as long as we make the margin BIG

slide-42
SLIDE 42

Support Vector Machines are powerful!

Handwriting recognition! (Automated mail sorting) Image classification! (Cat or not?) Text document classification! (Automated spam filtering)

slide-43
SLIDE 43

Machine learning is powerful!

slide-44
SLIDE 44

Thanks for helping with sorting!

slide-45
SLIDE 45

The sorting hat

  • Welcome to Hogwarts!
  • Every year the sorting hat sorts students into houses (e.g. Gryffindor and

Ravenclaw).

  • But the sorting hat is sick today :(.
  • Your job is to help the sorting hat sort students.
  • How can we do this?
  • Lets look at how previous students were sorted.
slide-46
SLIDE 46

How can we sort new students?

  • How can we use the data we plotted to sort this year’s students?
  • We will now try and sort a few students!
slide-47
SLIDE 47

How can we sort new students?

Intelligence Bravery House XX XX ?

slide-48
SLIDE 48

How can we sort new students?

Intelligence Bravery House XX XX Gryffindor (Harry Potter)

Sorting-hat solution:

slide-49
SLIDE 49

How can we sort new students?

Intelligence Bravery House XX XX Gryffindor (Ron Weasley) XX XX Ravenclaw (Luna Lovegood) XX XX Ravenclaw (Terry Boot) XX XX Ravenclaw (Padma Patil) XX XX Gryffindor (Parvati Patil) XX XX Gryffindor (Dean Thomas) XX XX Ravenclaw (Michael Corner)

Sorting-hat solutions:

slide-50
SLIDE 50

Maximum margins!

Here are two more students:

  • Does your “classifier” correctly sort these students?
  • How can we describe a “best” line using only the original students?

Intelligence Bravery House XX XX ? XX XX ?

slide-51
SLIDE 51

Maximum margins!

Sorting-hat solutions:

Intelligence Bravery House XX XX Gryffindor (Hermione Granger) XX XX Gryffindor (Neville Longbottom)

slide-52
SLIDE 52

Sorting hat answers show some outliers (but still barely linearly separable) (i.e. Hermione and Neville) Make a new line We can choose to either try really hard to do what the sorting hat, or do a better job of following the sorting hat’s overall pattern

slide-53
SLIDE 53

Last round of 2-D classification

slide-54
SLIDE 54

Humans versus non-humans

slide-55
SLIDE 55

Some description of how non-linear SVM works?

slide-56
SLIDE 56

How can we sort new students?

Intelligence Bravery House XX XX ? XX XX ? XX XX ? XX XX ? XX XX ? XX XX ? XX XX ?