Machine Learning Live        Clojure Conj 2012         Mike Anderson    @mikera   mike@nuroko.com
Machine Learning – A definition               "Field of study that gives computers               the ability to learn with...
Learning = Building functions from experienceTask                  Input                    OutputSimple mathematical   x ...
The state of machine learning“It works!      sort of….   sometimes….   on a good day….”                                   ...
nuroko.comWe’re building a toolkit for machine learning that is:• General purpose – works on any data• Powerful – advanced...
Why Clojure?       Productivity and fun!       Good parts of the JVMREPL       Interactive experiments       Functional pr...
Some Key AbstractionsVector          1 0 1 1 0                                   Efficiently represents information as a  ...
Neural Networks                                        Output layerDirection of                                           ...
How to train a neural network                   (BASIC version)10   Initialise network with some random weights20   Choose...
Live Demo – Part 1                     10
A harder problem….                     11
A trick – compression of data                      784 outputs     decompressor                      150 units (“bottlenec...
Putting it together   2                 10 outputs (one for each digit)                 150 units (compressed data)compres...
Live Demo – Part 2                     14
Questions?             15
Upcoming SlideShare
Loading in …5
×

Machine Learning Live

1,036 views

Published on

Presentation slides from my Machine Learning Live talk at the 2012 Clojure Conj

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,036
On SlideShare
0
From Embeds
0
Number of Embeds
13
Actions
Shares
0
Downloads
16
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Machine Learning Live

  1. 1. Machine Learning Live Clojure Conj 2012 Mike Anderson @mikera mike@nuroko.com
  2. 2. Machine Learning – A definition "Field of study that gives computers the ability to learn without being explicitly programmed.“ Arthur Samuel, 1959Source: Good Old Wikipedia 2
  3. 3. Learning = Building functions from experienceTask Input OutputSimple mathematical x y = sin(x)functionSpam filtering Text of an email Probability of email being message spam (%)Stockmarket Historical data on Expected priceprediction - Stock prices movements - Economic indicatorsRemembering Thought: Thought:names “Who was that guy “Oh yes – that was Bob” who liked windsurfing? 3
  4. 4. The state of machine learning“It works! sort of…. sometimes…. on a good day….” 4
  5. 5. nuroko.comWe’re building a toolkit for machine learning that is:• General purpose – works on any data• Powerful – advanced algorithms to detect complex patterns• Scalable – handle unlimited data at internet scale• Realtime – suitable for online use in real applications• Pragmatic – designed for solving real problems 5
  6. 6. Why Clojure? Productivity and fun! Good parts of the JVMREPL Interactive experiments Functional programming DSLs with composable abstractions 6
  7. 7. Some Key AbstractionsVector 1 0 1 1 0 Efficiently represents information as a vector of double values Converts arbitrary data into vectors (andCoder “Cat” 1 0 1 1 0 back again!) 𝑜𝑢𝑡𝑝𝑢𝑡 = 𝑓 𝑖𝑛𝑝𝑢𝑡 Represents a problem to solve – typicallyTask via provision of training examples Represents a functionModule - (e.g. a Neural Network)Algorithm Adjusts parameters in a module to learn a function from experience / data - (e.g. back-propagation) 7
  8. 8. Neural Networks Output layerDirection of Hidden layercalculation Weighted connections Input layerEach node’s value iscomputed as a functionof the weighted sum of itsinputs: 𝑦𝑖 = 𝑓 𝑤 𝑖𝑗 . 𝑥 𝑗 8
  9. 9. How to train a neural network (BASIC version)10 Initialise network with some random weights20 Choose a random training example as input30 Compute the output40 Determine error (difference vs. expected output)50 Adjust the weights very slightly to reduce the error60 GOTO 20 9
  10. 10. Live Demo – Part 1 10
  11. 11. A harder problem…. 11
  12. 12. A trick – compression of data 784 outputs decompressor 150 units (“bottleneck”) compressor 784 inputs 12
  13. 13. Putting it together 2 10 outputs (one for each digit) 150 units (compressed data)compressor 784 inputs 13
  14. 14. Live Demo – Part 2 14
  15. 15. Questions? 15

×