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
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
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