Slide 1

Slide 1 text

1 @juliaferraioli In the Name of Whiskey Julia Ferraioli Software Engineer @juliaferraioli

Slide 2

Slide 2 text

2 @juliaferraioli @juliaferraioli Engineer @ Google I’ve done some stuff in another life…

Slide 3

Slide 3 text

3 no PhD ⇒ no more machine learning for me

Slide 4

Slide 4 text

4 wait... what build rule checks for a PhD?

Slide 5

Slide 5 text

5 → ⚙ → ❓ data algorithm answer

Slide 6

Slide 6 text

6 E_TOO_FEW_HUGS

Slide 7

Slide 7 text

7 can I hug that?

Slide 8

Slide 8 text

8 @juliaferraioli Can I hug that?

Slide 9

Slide 9 text

9 @juliaferraioli Can I hug that?

Slide 10

Slide 10 text

10 but what about the whiskey?

Slide 11

Slide 11 text

11 ● A deep, abiding love for whiskey ● Some manageable, objective data ● Enthusiasm for math… ● ...or making computers do math What do we have?

Slide 12

Slide 12 text

12 let’s talk about data

Slide 13

Slide 13 text

13 @juliaferraioli (x,y) Feature vectors

Slide 14

Slide 14 text

14 @juliaferraioli (x,y,z) Feature vectors

Slide 15

Slide 15 text

15 @juliaferraioli (x,y,z,?,?,?,?,...) Feature vectors

Slide 16

Slide 16 text

16 our data

Slide 17

Slide 17 text

17 @juliaferraioli Distillery → Balvenie Body → 3 Notes → Honey:3, Floral:2, ... Region → Speyside Lat / Lon → Lat:57.4527074, Lon:-3.1237258 Data example

Slide 18

Slide 18 text

18 @juliaferraioli [Name, Region, Body, Notes 0 ,...,Notes n , Lat, Lng] Our potential feature vector

Slide 19

Slide 19 text

19 @juliaferraioli [5,3,2,1,0,0,3,2,1,0,2,2,2,57.4527074,-3.1237258] Our potential feature vector

Slide 20

Slide 20 text

20 Operates over tensors: n-dimensional arrays Using a flow graph: data flow computation framework A quick look at TensorFlow ● Intuitive construction ● Fast execution ● Train on CPUs, GPUs ● Run wherever you like

Slide 21

Slide 21 text

21 @juliaferraioli import tensorflow as tf sess = tf.InteractiveSession() # don’t mess with passing around a session whiskey_is_fun = tf.constant([6.2, 12.0, 5.9], shape = [1, 3]) beer_is_ok_too = tf.constant([9.3, 1.7, 8.8], shape = [3, 1]) matrices_omg = tf.matmul(whiskey_is_fun, beer_is_ok_too) print(matrices_omg.eval()) # => [[ 129.97999573]] sess.close() # let’s be responsible about this What does TensorFlow code look like?

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

23 k-means clustering

Slide 24

Slide 24 text

24 @juliaferraioli k = # of clusters

Slide 25

Slide 25 text

25 @juliaferraioli pick k random n-dimensional cluster centers while not converged and num_steps < max_steps: assign points to nearest cluster center update cluster centers to be the mean of the points assigned to it return cluster centers, memberships The algorithm

Slide 26

Slide 26 text

to the container!

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

28 feed forward neural networks [with hidden layer(s)]

Slide 29

Slide 29 text

29 @juliaferraioli ["this", "movie", "was", "great"] [" "] Input → Output → ????? →

Slide 30

Slide 30 text

30 @juliaferraioli ["this", "movie", "was", "great"] ["POS"] Input → Hidden → Output →

Slide 31

Slide 31 text

31 @juliaferraioli initialize hidden, output layers (weights and biases) define the training step (optimization) while num_steps > limit: grab next set of training data and labels perform training step evaluate on test data The algorithm (simplified)

Slide 32

Slide 32 text

to the container!

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

34 lessons

Slide 35

Slide 35 text

I’ve been pronouncing all of my scotch incorrectly

Slide 36

Slide 36 text

data collection is the hard part

Slide 37

Slide 37 text

common sense is not my strong suit

Slide 38

Slide 38 text

thinking in n-dimensions makes my brain hurt

Slide 39

Slide 39 text

NEED MOAR WHISKEY!

Slide 40

Slide 40 text

NEED MOAR DATA!

Slide 41

Slide 41 text

41 @juliaferraioli Resources ● TensorFlow: http://bit.ly/tensorflow-oss ● k-means Clustering Single Malts: http://bit.ly/k-means-scotch ● k-means in TensorFlow: http://bit.ly/k-means-tensorflow ● Feed forward neural networks in TensorFlow: http://bit.ly/ff-nn ● Learning TensorFlow: http://bit.ly/learn-tensorflow ● Gentle Introduction to ML: http://bit.ly/gentle-intro-ml

Slide 42

Slide 42 text

Octopus: image by Feans thanks! Toolbox: image by Tanemori