Upgrade to Pro — share decks privately, control downloads, hide ads and more …

In the Name of Whiskey

In the Name of Whiskey

Using Machine Learning and TensorFlow to make sense of scotches. Presented at Ruby on Ales 2016.


April 05, 2016

More Decks by juliaferraioli

Other Decks in Technology


  1. 11 • A deep, abiding love for whiskey • Some

    manageable, objective data • Enthusiasm for math… • ...or making computers do math What do we have?
  2. 17 @juliaferraioli Distillery → Balvenie Body → 3 Notes →

    Honey:3, Floral:2, ... Region → Speyside Lat / Lon → Lat:57.4527074, Lon:-3.1237258 Data example
  3. 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
  4. 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?
  5. 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
  6. 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)
  7. 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