Machine Learning II Techie Pizza #44267 Project Lesson 5 Michael - - PowerPoint PPT Presentation

machine learning ii
SMART_READER_LITE
LIVE PREVIEW

Machine Learning II Techie Pizza #44267 Project Lesson 5 Michael - - PowerPoint PPT Presentation

Machine Learning II Techie Pizza #44267 Project Lesson 5 Michael Lyle Dont use a five-dollar word when a fifty-cent word will do. - Mark Twain Dont use a five-dollar word when a fifty-cent word will do. - Mark Twain


slide-1
SLIDE 1

Machine Learning II

Techie Pizza #44267 Project Lesson 5 Michael Lyle

slide-2
SLIDE 2

“Don’t use a five-dollar word when a fifty-cent word will do.”

  • Mark Twain
slide-3
SLIDE 3

“Don’t use a five-dollar word when a fifty-cent word will do.”

  • Mark Twain

(But scientists like using five-dollar words; sorry about repeating them in this lesson!)

slide-4
SLIDE 4

Dense Neural Network

slide-5
SLIDE 5

Dense Neural Network

Every neuron is connected to every neuron in the previous layer. This is a lot of connections. Each connection has its own different “weight” to learn. This makes training slow-- and risks overfitting.

slide-6
SLIDE 6

Time Series Data

  • Measurements from an accelerometer arrive as

time-series data

Time (ms) Acceleration 0.37 10

  • 0.12

20

  • 0.30

30 8.15 40

  • 3.17

50 0.50 60

  • 0.15

70 0.78

slide-7
SLIDE 7

Graphing Time Series Data

Time (ms) Acceleration 0.37 10

  • 0.12

20

  • 0.30

30 8.15 40

  • 3.17

50 0.50 60

  • 0.15

70 0.78

10 20 30 40 50 60 70

  • 4
  • 2

2 4 6 8 10

Time (ms) Acceleration (m/s/s)

slide-8
SLIDE 8

Graphing Time Series Data

10 20 30 40 50 60 70

  • 4
  • 2

2 4 6 8 10

Time (ms) Acceleration (m/s/s)

Time (ms) Acceleration 0.37 10

  • 0.12

20

  • 0.30

30 8.15 40

  • 3.17

50 0.50 60

  • 0.15

70 0.78 Noise? A bump (something useful?)

slide-9
SLIDE 9

Time Series Data

  • If we record 10 seconds of data, with 100

measurements per second, that’s 1,000 measurements; each is an input

  • If we have a big dense layer using this data,

that is 1,000,000 weights (1,000 neurons each connected to 1,000 inputs)

  • Small computers like in current scooters can

handle neural networks with 25,000 weights

slide-10
SLIDE 10

5th Grade Math 6th Grade Math Pre-Algebra Algebra Geometry Algebra II Trigonometry Pre-Calculus Calculus Linear Algebra

Differential Equations

Multivariate/Vector Calculus Real & Complex Analysis Group Theory ...

slide-11
SLIDE 11

Convolutions

  • Convolutions are usually studied during a Differential

Equations class, but we can get the “gist” now!

  • Convolutions are a way of filtering data-- to smooth it
  • ut or exaggerate features
  • We make a recipe for the transformation we want--

called a convolution kernel

  • Then we follow the recipe for each entry in our data

table

  • Kernels can be any size, but for these examples size=3
slide-12
SLIDE 12

Our Data

10 20 30 40 50 60 70

  • 20
  • 15
  • 10
  • 5

5 10 15 20 25 30

Time (ms) Acceleration (m/s/s)

slide-13
SLIDE 13

Convolutions - Smooth

Time (ms) Acceleration 0.37 10

  • 0.12

20

  • 0.30

30 8.15 40

  • 3.17

50 0.50 60

  • 0.15

70 0.78 Take the average of each measurement, the measurement before, and the measurement after Time (ms) Smoothed 10

  • 0.02

20 2.57 30 1.56 40 1.83 50

  • 0.94

60 0.38 70

[

1 3 1 3 1 3]

slide-14
SLIDE 14

Convolutions - Smooth

Time (ms) Acceleration 0.37 10

  • 0.12

20

  • 0.30

30 8.15 40

  • 3.17

50 0.50 60

  • 0.15

70 0.78 Take the average of each measurement, the measurement before, and the measurement after Time (ms) Smoothed 10

  • 0.02

20 2.57 30 1.56 40 1.83 50

  • 0.94

60 0.38 70

[

1 3 1 3 1 3]

×1 3 ×1 3 ×1 3

+

slide-15
SLIDE 15

Convolutions - Smooth

Time (ms) Acceleration 0.37 10

  • 0.12

20

  • 0.30

30 8.15 40

  • 3.17

50 0.50 60

  • 0.15

70 0.78 Take the average of each measurement, the measurement before, and the measurement after Time (ms) Smoothed 10

  • 0.02

20 2.57 30 1.56 40 1.83 50

  • 0.94

60 0.38 70

[

1 3 1 3 1 3]

×1 3 ×1 3 ×1 3

+

slide-16
SLIDE 16

Our Data, Smoothed

10 20 30 40 50 60 70

  • 20
  • 15
  • 10
  • 5

5 10 15 20 25 30

Time (ms) Acceleration (m/s/s)

slide-17
SLIDE 17

Convolutions - Exaggerate

Time (ms) Acceleration 0.37 10

  • 0.12

20

  • 0.30

30 8.15 40

  • 3.17

50 0.50 60

  • 0.15

70 0.78 Take each measurement times 3, minus the measurement before and minus the one after Time (ms) Exaggerated 10

  • 0.43

20

  • 8.93

30 27.92 40

  • 18.16

50 4.82 60

  • 1.73

70

[−1

3 −1]

slide-18
SLIDE 18

Convolutions - Exaggerate

Time (ms) Acceleration 0.37 10

  • 0.12

20

  • 0.30

30 8.15 40

  • 3.17

50 0.50 60

  • 0.15

70 0.78 Take each measurement times 3, minus the measurement before and minus the one after Time (ms) Exaggerated 10

  • 0.43

20

  • 8.93

30 27.92 40

  • 18.16

50 4.82 60

  • 1.73

70

[−1

3 −1]

×(−1) ×3

+

×(−1)

slide-19
SLIDE 19

Convolutions - Exaggerate

Time (ms) Acceleration 0.37 10

  • 0.12

20

  • 0.30

30 8.15 40

  • 3.17

50 0.50 60

  • 0.15

70 0.78 Take each measurement times 3, minus the measurement before and minus the one after Time (ms) Exaggerated 10

  • 0.43

20

  • 8.93

30 27.92 40

  • 18.16

50 4.82 60

  • 1.73

70

[−1

3 −1]

×(−1) ×3

+

×(−1)

slide-20
SLIDE 20

Our Data, Exaggerated

10 20 30 40 50 60 70

  • 20
  • 15
  • 10
  • 5

5 10 15 20 25 30

Time (ms) Acceleration (m/s/s)

slide-21
SLIDE 21

Training an artifjcial neural network

1)Start with example data and a set of “correct answers.” 2)Adjust how strong the connections are to make the neural network produce closer to the output we

  • want. (“Training”)

3)Repeat. A lot. 4)For some problems, we may get a result that’s as good as a human, or even better!

Remember this slide?

slide-22
SLIDE 22

Convolutional Neural Network

  • A convolutional layer is a neural network layer that

performs convolutions

  • We don’t need to know the exact convolution we want:

training will find it for us

– This means we don’t need to take Differential Equations

first!

– Also the computer can find better convolutions than people

usually can.

  • Hopefully it simplifies the data in ways that make life

easier for the later layers

slide-23
SLIDE 23

Convolutional Neural Network

10 20 30 40 50 60 70

  • 20
  • 10

10 20 30

Time (ms) Acceleration

10 20 30 40 50 70 20 40 60 80 100

Time (ms) Detection

slide-24
SLIDE 24

Convolutional Neural Network

10 20 30 40 50 60 70

  • 20
  • 10

10 20 30

Time (ms) Acceleration

10 20 30 40 50 70 20 40 60 80 100

Time (ms) Detection

3 weights!

slide-25
SLIDE 25

Summary

  • Time series data measures how values from a

sensor change over time.

  • Convolutional neural networks are good at

matching patterns in time-series data.

  • Convolutional layers are much more efficient

(fast to train, fast to “run”) than dense layers, but are limited to spotting local patterns.